diff --git a/src/test/resources/suite-yaml/remotes/subSchemas.yml b/src/test/resources/suite-yaml/remotes/draft3/subSchemas.yml similarity index 100% rename from src/test/resources/suite-yaml/remotes/subSchemas.yml rename to src/test/resources/suite-yaml/remotes/draft3/subSchemas.yml diff --git a/src/test/resources/suite-yaml/remotes/locationIndependentIdentifierDraft4.yml b/src/test/resources/suite-yaml/remotes/draft4/locationIndependentIdentifier.yml similarity index 100% rename from src/test/resources/suite-yaml/remotes/locationIndependentIdentifierDraft4.yml rename to src/test/resources/suite-yaml/remotes/draft4/locationIndependentIdentifier.yml diff --git a/src/test/resources/suite-yaml/remotes/name.yml b/src/test/resources/suite-yaml/remotes/draft4/name.yml similarity index 100% rename from src/test/resources/suite-yaml/remotes/name.yml rename to src/test/resources/suite-yaml/remotes/draft4/name.yml diff --git a/src/test/resources/suite-yaml/remotes/draft4/subSchemas.yml b/src/test/resources/suite-yaml/remotes/draft4/subSchemas.yml new file mode 100644 index 00000000..a1004577 --- /dev/null +++ b/src/test/resources/suite-yaml/remotes/draft4/subSchemas.yml @@ -0,0 +1,5 @@ +definitions: + integer: + type: integer + refToInteger: + $ref: '#/definitions/integer' diff --git a/src/test/resources/suite-yaml/remotes/locationIndependentIdentifierPre2019.yml b/src/test/resources/suite-yaml/remotes/draft7/locationIndependentIdentifier.yml similarity index 100% rename from src/test/resources/suite-yaml/remotes/locationIndependentIdentifierPre2019.yml rename to src/test/resources/suite-yaml/remotes/draft7/locationIndependentIdentifier.yml diff --git a/src/test/resources/suite-yaml/remotes/draft7/name.yml b/src/test/resources/suite-yaml/remotes/draft7/name.yml new file mode 100644 index 00000000..97ae817c --- /dev/null +++ b/src/test/resources/suite-yaml/remotes/draft7/name.yml @@ -0,0 +1,6 @@ +definitions: + orNull: + anyOf: + - type: "null" + - $ref: '#' +type: string diff --git a/src/test/resources/suite-yaml/remotes/ref-and-definitions.yml b/src/test/resources/suite-yaml/remotes/draft7/ref-and-definitions.yml similarity index 64% rename from src/test/resources/suite-yaml/remotes/ref-and-definitions.yml rename to src/test/resources/suite-yaml/remotes/draft7/ref-and-definitions.yml index 76c7c44e..02f1c753 100644 --- a/src/test/resources/suite-yaml/remotes/ref-and-definitions.yml +++ b/src/test/resources/suite-yaml/remotes/draft7/ref-and-definitions.yml @@ -1,4 +1,4 @@ -$id: http://localhost:1234/ref-and-definitions.json +$id: http://localhost:1234/draft7/ref-and-definitions.json definitions: inner: properties: diff --git a/src/test/resources/suite-yaml/remotes/draft7/subSchemas.yml b/src/test/resources/suite-yaml/remotes/draft7/subSchemas.yml new file mode 100644 index 00000000..a1004577 --- /dev/null +++ b/src/test/resources/suite-yaml/remotes/draft7/subSchemas.yml @@ -0,0 +1,5 @@ +definitions: + integer: + type: integer + refToInteger: + $ref: '#/definitions/integer' diff --git a/src/test/resources/suite-yaml/tests/draft7/refRemote.yml b/src/test/resources/suite-yaml/tests/draft7/refRemote.yml index bb2708cd..9170eb65 100644 --- a/src/test/resources/suite-yaml/tests/draft7/refRemote.yml +++ b/src/test/resources/suite-yaml/tests/draft7/refRemote.yml @@ -10,7 +10,7 @@ valid: false - description: fragment within remote ref schema: - $ref: http://localhost:1234/subSchemas.json#/definitions/integer + $ref: http://localhost:1234/draft7/subSchemas.json#/definitions/integer tests: - description: remote fragment valid data: 1 @@ -20,7 +20,7 @@ valid: false - description: ref within remote ref schema: - $ref: http://localhost:1234/subSchemas.json#/definitions/refToInteger + $ref: http://localhost:1234/draft7/subSchemas.json#/definitions/refToInteger tests: - description: ref within ref valid data: 1 @@ -100,7 +100,7 @@ type: object properties: name: - $ref: name.json#/definitions/orNull + $ref: draft7/name.json#/definitions/orNull tests: - description: string is valid data: @@ -119,7 +119,7 @@ schema: $id: http://localhost:1234/schema-remote-ref-ref-defs1.json allOf: - - $ref: ref-and-definitions.json + - $ref: draft7/ref-and-definitions.json tests: - description: invalid data: @@ -131,7 +131,7 @@ valid: true - description: Location-independent identifier in remote ref schema: - $ref: http://localhost:1234/locationIndependentIdentifierPre2019.json#/definitions/refToInteger + $ref: http://localhost:1234/draft7/locationIndependentIdentifier.json#/definitions/refToInteger tests: - description: integer is valid data: 1 diff --git a/src/test/resources/suite/remotes/subSchemas.json b/src/test/resources/suite/remotes/draft3/subSchemas.json similarity index 100% rename from src/test/resources/suite/remotes/subSchemas.json rename to src/test/resources/suite/remotes/draft3/subSchemas.json diff --git a/src/test/resources/suite/remotes/locationIndependentIdentifierDraft4.json b/src/test/resources/suite/remotes/draft4/locationIndependentIdentifier.json similarity index 100% rename from src/test/resources/suite/remotes/locationIndependentIdentifierDraft4.json rename to src/test/resources/suite/remotes/draft4/locationIndependentIdentifier.json diff --git a/src/test/resources/suite/remotes/name.json b/src/test/resources/suite/remotes/draft4/name.json similarity index 100% rename from src/test/resources/suite/remotes/name.json rename to src/test/resources/suite/remotes/draft4/name.json diff --git a/src/test/resources/suite/remotes/draft4/subSchemas.json b/src/test/resources/suite/remotes/draft4/subSchemas.json new file mode 100644 index 00000000..6e9b3de3 --- /dev/null +++ b/src/test/resources/suite/remotes/draft4/subSchemas.json @@ -0,0 +1,10 @@ +{ + "definitions": { + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/definitions/integer" + } + } +} diff --git a/src/test/resources/suite/remotes/locationIndependentIdentifierPre2019.json b/src/test/resources/suite/remotes/draft7/locationIndependentIdentifier.json similarity index 100% rename from src/test/resources/suite/remotes/locationIndependentIdentifierPre2019.json rename to src/test/resources/suite/remotes/draft7/locationIndependentIdentifier.json diff --git a/src/test/resources/suite/remotes/draft7/name.json b/src/test/resources/suite/remotes/draft7/name.json new file mode 100644 index 00000000..fceacb80 --- /dev/null +++ b/src/test/resources/suite/remotes/draft7/name.json @@ -0,0 +1,15 @@ +{ + "definitions": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" +} diff --git a/src/test/resources/suite/remotes/ref-and-definitions.json b/src/test/resources/suite/remotes/draft7/ref-and-definitions.json similarity index 74% rename from src/test/resources/suite/remotes/ref-and-definitions.json rename to src/test/resources/suite/remotes/draft7/ref-and-definitions.json index e0ee802a..d5929380 100644 --- a/src/test/resources/suite/remotes/ref-and-definitions.json +++ b/src/test/resources/suite/remotes/draft7/ref-and-definitions.json @@ -1,5 +1,5 @@ { - "$id": "http://localhost:1234/ref-and-definitions.json", + "$id": "http://localhost:1234/draft7/ref-and-definitions.json", "definitions": { "inner": { "properties": { diff --git a/src/test/resources/suite/remotes/draft7/subSchemas.json b/src/test/resources/suite/remotes/draft7/subSchemas.json new file mode 100644 index 00000000..6e9b3de3 --- /dev/null +++ b/src/test/resources/suite/remotes/draft7/subSchemas.json @@ -0,0 +1,10 @@ +{ + "definitions": { + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/definitions/integer" + } + } +} diff --git a/src/test/resources/suite/tests/draft7/refRemote.json b/src/test/resources/suite/tests/draft7/refRemote.json index 22185d67..450787af 100644 --- a/src/test/resources/suite/tests/draft7/refRemote.json +++ b/src/test/resources/suite/tests/draft7/refRemote.json @@ -17,7 +17,7 @@ }, { "description": "fragment within remote ref", - "schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"}, + "schema": {"$ref": "http://localhost:1234/draft7/subSchemas.json#/definitions/integer"}, "tests": [ { "description": "remote fragment valid", @@ -34,7 +34,7 @@ { "description": "ref within remote ref", "schema": { - "$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger" + "$ref": "http://localhost:1234/draft7/subSchemas.json#/definitions/refToInteger" }, "tests": [ { @@ -139,7 +139,7 @@ "$id": "http://localhost:1234/object", "type": "object", "properties": { - "name": {"$ref": "name.json#/definitions/orNull"} + "name": {"$ref": "draft7/name.json#/definitions/orNull"} } }, "tests": [ @@ -173,7 +173,7 @@ "schema": { "$id": "http://localhost:1234/schema-remote-ref-ref-defs1.json", "allOf": [ - { "$ref": "ref-and-definitions.json" } + { "$ref": "draft7/ref-and-definitions.json" } ] }, "tests": [ @@ -196,7 +196,7 @@ { "description": "Location-independent identifier in remote ref", "schema": { - "$ref": "http://localhost:1234/locationIndependentIdentifierPre2019.json#/definitions/refToInteger" + "$ref": "http://localhost:1234/draft7/locationIndependentIdentifier.json#/definitions/refToInteger" }, "tests": [ {