diff --git a/spec/remotes/bar.json b/spec/remotes/bar.json index 96ad644..cc30391 100644 --- a/spec/remotes/bar.json +++ b/spec/remotes/bar.json @@ -1,4 +1,4 @@ { - "id": "http://localhost:1234/bar.json", + "$id": "http://localhost:1234/bar.json", "type": "string" } diff --git a/spec/remotes/buu.json b/spec/remotes/buu.json index 3f0f9af..f3d905c 100644 --- a/spec/remotes/buu.json +++ b/spec/remotes/buu.json @@ -1,5 +1,5 @@ { - "id": "http://localhost:1234/buu.json", + "$id": "http://localhost:1234/buu.json", "definitions": { "buu": { "type": "object", diff --git a/spec/remotes/first.json b/spec/remotes/first.json index 7d41466..9fdb8d4 100644 --- a/spec/remotes/first.json +++ b/spec/remotes/first.json @@ -1,4 +1,4 @@ { - "id": "http://localhost:1234/first.json", + "$id": "http://localhost:1234/first.json", "type": "string" } diff --git a/spec/remotes/foo.json b/spec/remotes/foo.json index b9a00dd..9e56566 100644 --- a/spec/remotes/foo.json +++ b/spec/remotes/foo.json @@ -1,5 +1,5 @@ { - "id": "http://localhost:1234/foo.json", + "$id": "http://localhost:1234/foo.json", "type": "object", "properties": { "bar": { "$ref": "bar.json" } diff --git a/spec/remotes/node.json b/spec/remotes/node.json index d592c85..41120c1 100644 --- a/spec/remotes/node.json +++ b/spec/remotes/node.json @@ -1,5 +1,5 @@ { - "id": "http://localhost:1234/node.json", + "$id": "http://localhost:1234/node.json", "description": "node", "type": "object", "properties": { diff --git a/spec/remotes/scope_change.json b/spec/remotes/scope_change.json index 74ccbe8..67991f9 100644 --- a/spec/remotes/scope_change.json +++ b/spec/remotes/scope_change.json @@ -1,8 +1,8 @@ { - "id": "http://localhost:1234/scope_change.json", + "$id": "http://localhost:1234/scope_change.json", "definitions": { "foo": { - "id": "http://localhost:1234/scope_foo.json", + "$id": "http://localhost:1234/scope_foo.json", "definitions": { "bar": { "type": "string" @@ -10,7 +10,7 @@ } }, "baz": { - "id": "folder/", + "$id": "folder/", "type": "array", "items": { "$ref": "folderInteger.json" }, "bar": { diff --git a/spec/remotes/second.json b/spec/remotes/second.json index 06b4bc6..56e32eb 100644 --- a/spec/remotes/second.json +++ b/spec/remotes/second.json @@ -1,5 +1,5 @@ { - "id": "http://localhost:1234/second.json", + "$id": "http://localhost:1234/second.json", "type": "object", "properties": { "first": { "$ref": "first.json" } diff --git a/spec/remotes/tree.json b/spec/remotes/tree.json index ba9d4cb..39df561 100644 --- a/spec/remotes/tree.json +++ b/spec/remotes/tree.json @@ -1,5 +1,5 @@ { - "id": "http://localhost:1234/tree.json", + "$id": "http://localhost:1234/tree.json", "description": "tree of nodes", "type": "object", "properties": { diff --git a/spec/schema-tests.spec.js b/spec/schema-tests.spec.js index e6e5c3a..a076057 100644 --- a/spec/schema-tests.spec.js +++ b/spec/schema-tests.spec.js @@ -6,7 +6,7 @@ var jsonSchemaTest = require('json-schema-test') , suite = require('./browser_test_suite') , after = require('./after_test'); -var instances = getAjvInstances(options, {schemaId: 'auto', unknownFormats: ['allowedUnknown']}); +var instances = getAjvInstances(options, {unknownFormats: ['allowedUnknown']}); var remoteRefs = { 'http://localhost:1234/integer.json': require('./JSON-Schema-Test-Suite/remotes/integer.json'), @@ -36,9 +36,7 @@ jsonSchemaTest(instances, { ? suite(require('./tests/{**/,}*.json', {mode: 'list'})) : './tests/{**/,}*.json' }, - only: [ - // 'schemas/complex', 'schemas/basic', 'schemas/advanced', - ], + only: [], assert: require('./chai').assert, afterError: after.error, afterEach: after.each, @@ -48,7 +46,6 @@ jsonSchemaTest(instances, { function addRemoteRefs(ajv) { - ajv.addMetaSchema(require('../lib/refs/json-schema-draft-04.json')); for (var id in remoteRefs) ajv.addSchema(remoteRefs[id], id); ajv.addSchema(remoteRefsWithIds); } diff --git a/spec/tests/issues/13_root_ref_in_ref_in_remote_ref.json b/spec/tests/issues/13_root_ref_in_ref_in_remote_ref.json index 5947cc5..a55625a 100644 --- a/spec/tests/issues/13_root_ref_in_ref_in_remote_ref.json +++ b/spec/tests/issues/13_root_ref_in_ref_in_remote_ref.json @@ -1,22 +1,13 @@ [ { "description": "root ref in remote ref (#13)", - "schemas": [ - { - "id": "http://localhost:1234/issue13_1", - "type": "object", - "properties": { - "name": { "$ref": "name.json#/definitions/orNull" } - } - }, - { - "$id": "http://localhost:1234/issue13_2", - "type": "object", - "properties": { - "name": { "$ref": "name.json#/definitions/orNull" } - } + "schema": { + "$id": "http://localhost:1234/issue13", + "type": "object", + "properties": { + "name": { "$ref": "name.json#/definitions/orNull" } } - ], + }, "tests": [ { "description": "string is valid", diff --git a/spec/tests/issues/14_ref_in_remote_ref_with_id.json b/spec/tests/issues/14_ref_in_remote_ref_with_id.json index ae9f3f8..57b474a 100644 --- a/spec/tests/issues/14_ref_in_remote_ref_with_id.json +++ b/spec/tests/issues/14_ref_in_remote_ref_with_id.json @@ -1,18 +1,11 @@ [ { "description": "ref in remote ref with ids", - "schemas": [ - { - "id": "http://localhost:1234/issue14a_1.json", - "type": "array", - "items": { "$ref": "foo.json" } - }, - { - "$id": "http://localhost:1234/issue14a_2.json", - "type": "array", - "items": { "$ref": "foo.json" } - } - ], + "schema": { + "$id": "http://localhost:1234/issue14a.json", + "type": "array", + "items": { "$ref": "foo.json" } + }, "tests": [ { "description": "string is valid", @@ -36,18 +29,11 @@ }, { "description": "remote ref in definitions in remote ref with ids (#14)", - "schemas": [ - { - "id": "http://localhost:1234/issue14b_1.json", - "type": "array", - "items": { "$ref": "buu.json#/definitions/buu" } - }, - { - "$id": "http://localhost:1234/issue14b_2.json", - "type": "array", - "items": { "$ref": "buu.json#/definitions/buu" } - } - ], + "schema": { + "$id": "http://localhost:1234/issue14b.json", + "type": "array", + "items": { "$ref": "buu.json#/definitions/buu" } + }, "tests": [ { "description": "string is valid", diff --git a/spec/tests/issues/170_ref_and_id_in_sibling.json b/spec/tests/issues/170_ref_and_id_in_sibling.json index 6bfecd5..bb08d82 100644 --- a/spec/tests/issues/170_ref_and_id_in_sibling.json +++ b/spec/tests/issues/170_ref_and_id_in_sibling.json @@ -3,12 +3,12 @@ "description": "sibling property has id (#170)", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/base_object_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://example.com/base_object_1", "type": "object", "properties": { "title": { - "id": "http://example.com/title", + "$id": "http://example.com/title", "type": "string" }, "file": { "$ref": "#/definitions/file-entry" } @@ -56,12 +56,12 @@ "description": "sibling item has id", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/base_array_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://example.com/base_array_1", "type": "array", "items": [ { - "id": "http://example.com/0", + "$id": "http://example.com/0", "type": "string" }, { "$ref": "#/definitions/file-entry" } @@ -103,11 +103,11 @@ "description": "sibling schema in anyOf has id", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/base_anyof_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://example.com/base_anyof_1", "anyOf": [ { - "id": "http://example.com/0", + "$id": "http://example.com/0", "type": "number" }, { "$ref": "#/definitions/def" } @@ -153,11 +153,11 @@ "description": "sibling schema in oneOf has id", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/base_oneof_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://example.com/base_oneof_1", "oneOf": [ { - "id": "http://example.com/0", + "$id": "http://example.com/0", "type": "number" }, { "$ref": "#/definitions/def" } @@ -203,11 +203,11 @@ "description": "sibling schema in allOf has id", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/base_allof_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://example.com/base_allof_1", "allOf": [ { - "id": "http://example.com/0", + "$id": "http://example.com/0", "type": "string", "maxLength": 3 }, @@ -250,12 +250,12 @@ "description": "sibling schema in dependencies has id", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/base_dependencies_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://example.com/base_dependencies_1", "type": "object", "dependencies": { "foo": { - "id": "http://example.com/foo", + "$id": "http://example.com/foo", "required": [ "bar" ] }, "bar": { "$ref": "#/definitions/def" } diff --git a/spec/tests/issues/1_ids_in_refs.json b/spec/tests/issues/1_ids_in_refs.json index 5c6eed1..579e7d0 100644 --- a/spec/tests/issues/1_ids_in_refs.json +++ b/spec/tests/issues/1_ids_in_refs.json @@ -5,7 +5,7 @@ { "definitions": { "int": { - "id": "#int", + "$id": "#int", "type": "integer" } }, @@ -30,10 +30,10 @@ "description": "IDs in refs with root id", "schemas": [ { - "id": "http://example.com/int_1.json", + "$id": "http://example.com/int_1.json", "definitions": { "int": { - "id": "#int", + "$id": "#int", "type": "integer" } }, diff --git a/spec/tests/issues/27_1_recursive_raml_schema.json b/spec/tests/issues/27_1_recursive_raml_schema.json index 51706e3..e2146b2 100644 --- a/spec/tests/issues/27_1_recursive_raml_schema.json +++ b/spec/tests/issues/27_1_recursive_raml_schema.json @@ -3,7 +3,7 @@ "description": "JSON Schema for a standard RAML object (#27)", "schema": { "title": "A JSON Schema for a standard RAML object", - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [ "title" diff --git a/spec/tests/issues/27_recursive_reference.json b/spec/tests/issues/27_recursive_reference.json index f2059cc..6da6869 100644 --- a/spec/tests/issues/27_recursive_reference.json +++ b/spec/tests/issues/27_recursive_reference.json @@ -3,12 +3,12 @@ "description": "Recursive reference (#27)", "schemas": [ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "testrec_1", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "testrec_1", "type": "object", "properties": { "layout": { - "id": "layout", + "$id": "layout", "type": "object", "properties": { "layout": { "type": "string" }, diff --git a/spec/tests/issues/63_id_property_not_in_schema.json b/spec/tests/issues/63_id_property_not_in_schema.json index 371b18c..ce425cc 100644 --- a/spec/tests/issues/63_id_property_not_in_schema.json +++ b/spec/tests/issues/63_id_property_not_in_schema.json @@ -1,20 +1,12 @@ [ { "description": "id property in referenced schema in object that is not a schema (#63)", - "schemas": [ - { - "type" : "object", - "properties": { - "title": { "$ref": "http://json-schema.org/draft-04/schema#/properties/title" } - } - }, - { - "type" : "object", - "properties": { - "title": { "$ref": "http://json-schema.org/draft-07/schema#/properties/title" } - } + "schema": { + "type" : "object", + "properties": { + "title": { "$ref": "http://json-schema.org/draft-07/schema#/properties/title" } } - ], + }, "tests": [ { "description": "empty object is valid", diff --git a/spec/tests/issues/70_1_recursive_hash_ref_in_remote_ref.json b/spec/tests/issues/70_1_recursive_hash_ref_in_remote_ref.json index 8a53325..651e3d0 100644 --- a/spec/tests/issues/70_1_recursive_hash_ref_in_remote_ref.json +++ b/spec/tests/issues/70_1_recursive_hash_ref_in_remote_ref.json @@ -2,7 +2,7 @@ { "description": "hash ref inside hash ref in remote ref (#70, was passing)", "schema": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" }, "tests": [ { "data": 1, "valid": true, "description": "positive integer is valid" }, @@ -12,16 +12,10 @@ }, { "description": "hash ref inside hash ref in remote ref with id (#70, was passing)", - "schemas": [ - { - "id": "http://example.com/my_schema_1.json", - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - { - "$id": "http://example.com/my_schema_2.json", - "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" - } - ], + "schema": { + "$id": "http://example.com/my_schema_2.json", + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" + }, "tests": [ { "data": 1, "valid": true, "description": "positive integer is valid" }, { "data": 0, "valid": true, "description": "zero is valid" }, @@ -32,7 +26,7 @@ "description": "local hash ref with remote hash ref without inner hash ref (#70, was passing)", "schema": { "definitions": { - "a": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" } + "a": { "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" } }, "properties": { "b": { "$ref": "#/definitions/a" } @@ -48,7 +42,7 @@ "description": "local hash ref with remote hash ref that has inner hash ref (#70)", "schema": { "definitions": { - "a": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" } + "a": { "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" } }, "properties": { "b": { "$ref": "#/definitions/a" } diff --git a/spec/tests/issues/70_swagger_schema.json b/spec/tests/issues/70_swagger_schema.json index 0c97800..3c9a2c8 100644 --- a/spec/tests/issues/70_swagger_schema.json +++ b/spec/tests/issues/70_swagger_schema.json @@ -3,8 +3,8 @@ "description": "Swagger api schema does not compile (#70)", "schema": { "title": "A JSON Schema for Swagger 2.0 API.", - "id": "http://swagger.io/v2/schema.json#", - "$schema": "http://json-schema.org/draft-04/schema#", + "$id": "http://swagger.io/v2/schema.json#", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [ "swagger", @@ -935,58 +935,58 @@ "type": "string" }, "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + "$ref": "http://json-schema.org/draft-07/schema#/properties/title" }, "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + "$ref": "http://json-schema.org/draft-07/schema#/properties/description" }, "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + "$ref": "http://json-schema.org/draft-07/schema#/properties/default" }, "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + "$ref": "http://json-schema.org/draft-07/schema#/properties/multipleOf" }, "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/maximum" }, "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/exclusiveMaximum" }, "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/minimum" }, "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/exclusiveMinimum" }, "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeInteger" }, "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" }, "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + "$ref": "http://json-schema.org/draft-07/schema#/properties/pattern" }, "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeInteger" }, "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + "$ref": "http://json-schema.org/draft-07/schema#/properties/uniqueItems" }, "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeInteger" }, "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" }, "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/stringArray" }, "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/enum" }, "additionalProperties": { "anyOf": [ @@ -1000,7 +1000,7 @@ "default": {} }, "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + "$ref": "http://json-schema.org/draft-07/schema#/properties/type" }, "items": { "anyOf": [ @@ -1064,16 +1064,16 @@ "type": "string" }, "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + "$ref": "http://json-schema.org/draft-07/schema#/properties/title" }, "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + "$ref": "http://json-schema.org/draft-07/schema#/properties/description" }, "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + "$ref": "http://json-schema.org/draft-07/schema#/properties/default" }, "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/stringArray" }, "type": { "type": "string", @@ -1534,49 +1534,49 @@ "default": "csv" }, "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + "$ref": "http://json-schema.org/draft-07/schema#/properties/title" }, "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + "$ref": "http://json-schema.org/draft-07/schema#/properties/description" }, "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + "$ref": "http://json-schema.org/draft-07/schema#/properties/default" }, "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + "$ref": "http://json-schema.org/draft-07/schema#/properties/multipleOf" }, "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/maximum" }, "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/exclusiveMaximum" }, "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/minimum" }, "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/exclusiveMinimum" }, "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeInteger" }, "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" }, "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + "$ref": "http://json-schema.org/draft-07/schema#/properties/pattern" }, "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeInteger" }, "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + "$ref": "http://json-schema.org/draft-07/schema#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + "$ref": "http://json-schema.org/draft-07/schema#/properties/uniqueItems" }, "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + "$ref": "http://json-schema.org/draft-07/schema#/properties/enum" }, "jsonReference": { "type": "object", diff --git a/spec/tests/schemas/advanced.json b/spec/tests/schemas/advanced.json index 12e94fc..7c6cea9 100644 --- a/spec/tests/schemas/advanced.json +++ b/spec/tests/schemas/advanced.json @@ -2,7 +2,7 @@ { "description": "advanced schema from z-schema benchmark (https://github.com/zaggino/z-schema)", "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "/": { "$ref": "#/definitions/entry" } @@ -14,7 +14,7 @@ "required": [ "/" ], "definitions": { "entry": { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "description": "schema for an fstab entry", "type": "object", "required": [ "storage" ], diff --git a/spec/tests/schemas/basic.json b/spec/tests/schemas/basic.json index 1ab3c4a..a650069 100644 --- a/spec/tests/schemas/basic.json +++ b/spec/tests/schemas/basic.json @@ -2,7 +2,7 @@ { "description": "basic schema from z-schema benchmark (https://github.com/zaggino/z-schema)", "schema": { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "Product set", "type": "array", "items": { @@ -18,8 +18,7 @@ }, "price": { "type": "number", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": 0 }, "tags": { "type": "array", diff --git a/spec/tests/schemas/complex.json b/spec/tests/schemas/complex.json index 68a9561..46d1544 100644 --- a/spec/tests/schemas/complex.json +++ b/spec/tests/schemas/complex.json @@ -7,17 +7,17 @@ "minItems": 1, "definitions": { "base58": { - "id": "#base58", + "$id": "#base58", "type": "string", "pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$" }, "hex": { - "id": "#hex", + "$id": "#hex", "type": "string", "pattern": "^[0123456789A-Fa-f]+$" }, "tx_id": { - "id": "#tx_id", + "$id": "#tx_id", "allOf": [ { "$ref": "#hex" }, { @@ -27,7 +27,7 @@ ] }, "address": { - "id": "#address", + "$id": "#address", "allOf": [ { "$ref": "#base58" }, { @@ -37,7 +37,7 @@ ] }, "signature": { - "id": "#signature", + "$id": "#signature", "allOf": [ { "$ref": "#hex" }, { @@ -47,7 +47,7 @@ ] }, "transaction": { - "id": "#transaction", + "$id": "#transaction", "additionalProperties": false, "required": [ "metadata", @@ -108,7 +108,7 @@ } }, "input": { - "id": "#input", + "$id": "#input", "type": "object", "additionalProperties": false, "required": [ @@ -134,7 +134,7 @@ } }, "output": { - "id": "#output", + "$id": "#output", "type": "object", "additionalProperties": false, "required": [ diff --git a/spec/tests/schemas/complex3.json b/spec/tests/schemas/complex3.json index 13d6375..1591d78 100644 --- a/spec/tests/schemas/complex3.json +++ b/spec/tests/schemas/complex3.json @@ -2,23 +2,23 @@ { "description": "complex schema from jsck benchmark (https://github.com/pandastrike/jsck)", "schema": { - "id": "http://example.com/complex3.json", + "$id": "http://example.com/complex3.json", "type": "array", "items": { "$ref": "#transaction" }, "minItems": 1, "definitions": { "base58": { - "id": "#base58", + "$id": "#base58", "type": "string", "pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$" }, "hex": { - "id": "#hex", + "$id": "#hex", "type": "string", "pattern": "^[0123456789A-Fa-f]+$" }, "tx_id": { - "id": "#tx_id", + "$id": "#tx_id", "allOf": [ { "$ref": "#hex" }, { @@ -28,7 +28,7 @@ ] }, "address": { - "id": "#address", + "$id": "#address", "allOf": [ { "$ref": "#base58" }, { @@ -38,7 +38,7 @@ ] }, "signature": { - "id": "#signature", + "$id": "#signature", "allOf": [ { "$ref": "#hex" }, { @@ -48,7 +48,7 @@ ] }, "transaction": { - "id": "#transaction", + "$id": "#transaction", "additionalProperties": false, "required": [ "metadata", @@ -109,7 +109,7 @@ } }, "input": { - "id": "#input", + "$id": "#input", "type": "object", "additionalProperties": false, "required": [ @@ -135,7 +135,7 @@ } }, "output": { - "id": "#output", + "$id": "#output", "type": "object", "additionalProperties": false, "required": [