lib/schemas/json-schema.org/draft-06/schema.rb in jsi-0.4.0 vs lib/schemas/json-schema.org/draft-06/schema.rb in jsi-0.6.0

- old
+ new

@@ -1,7 +1,12 @@ # frozen_string_literal: true module JSI - schema_id = 'http://json-schema.org/draft/schema' # I don't know why this is not http://json-schema.org/draft-06/schema - schema_content = ::JSON.parse(File.read(::JSON::Validator.validators[schema_id].metaschema)) - JSONSchemaOrgDraft06 = MetaschemaNode.new(schema_content).jsi_schema_module + metaschema_document = ::JSON.parse(SCHEMAS_PATH.join('json-schema.org/draft-06/schema.json').read) + JSONSchemaOrgDraft06 = MetaschemaNode.new(metaschema_document, + metaschema_instance_modules: [JSI::Schema::Draft06], + ).jsi_schema_module + + # the JSI schema module for `http://json-schema.org/draft-06/schema` + module JSONSchemaOrgDraft06 + end end