Skip to content

Add missing $schema keyword to required test cases #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/draft-next/dependentSchemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
{
"description": "dependent subschema incompatible with root",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"properties": {
"foo": {}
},
Expand Down
8 changes: 8 additions & 0 deletions tests/draft-next/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
{
"description": "URN ref with nested pointer ref",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed",
"$defs": {
"foo": {
Expand All @@ -887,6 +888,7 @@
{
"description": "ref to if",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://example.com/ref/if",
"if": {
"$id": "http://example.com/ref/if",
Expand All @@ -909,6 +911,7 @@
{
"description": "ref to then",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://example.com/ref/then",
"then": {
"$id": "http://example.com/ref/then",
Expand All @@ -931,6 +934,7 @@
{
"description": "ref to else",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://example.com/ref/else",
"else": {
"$id": "http://example.com/ref/else",
Expand All @@ -953,6 +957,7 @@
{
"description": "ref with absolute-path-reference",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "http://example.com/ref/absref.json",
"$defs": {
"a": {
Expand Down Expand Up @@ -982,6 +987,7 @@
{
"description": "$id with file URI still resolves pointers - *nix",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "file:///folder/file.json",
"$defs": {
"foo": {
Expand All @@ -1006,6 +1012,7 @@
{
"description": "$id with file URI still resolves pointers - windows",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$id": "file:///c:/folder/file.json",
"$defs": {
"foo": {
Expand All @@ -1030,6 +1037,7 @@
{
"description": "empty tokens in $ref json-pointer",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$defs": {
"": {
"$defs": {
Expand Down
16 changes: 13 additions & 3 deletions tests/draft-next/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@
},
{
"description": "remote HTTP ref with different $id",
"schema": {"$ref": "http://localhost:1234/different-id-ref-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/different-id-ref-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -281,7 +284,10 @@
},
{
"description": "remote HTTP ref with different URN $id",
"schema": {"$ref": "http://localhost:1234/urn-ref-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/urn-ref-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -297,7 +303,10 @@
},
{
"description": "remote HTTP ref with nested absolute ref",
"schema": {"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -314,6 +323,7 @@
{
"description": "$ref to $ref finds detached $anchor",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/draft-next/detached-ref.json#/$defs/foo"
},
"tests": [
Expand Down
1 change: 1 addition & 0 deletions tests/draft2019-09/dependentSchemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
{
"description": "dependent subschema incompatible with root",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"properties": {
"foo": {}
},
Expand Down
8 changes: 8 additions & 0 deletions tests/draft2019-09/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
{
"description": "URN ref with nested pointer ref",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed",
"$defs": {
"foo": {
Expand All @@ -887,6 +888,7 @@
{
"description": "ref to if",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://example.com/ref/if",
"if": {
"$id": "http://example.com/ref/if",
Expand All @@ -909,6 +911,7 @@
{
"description": "ref to then",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://example.com/ref/then",
"then": {
"$id": "http://example.com/ref/then",
Expand All @@ -931,6 +934,7 @@
{
"description": "ref to else",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://example.com/ref/else",
"else": {
"$id": "http://example.com/ref/else",
Expand All @@ -953,6 +957,7 @@
{
"description": "ref with absolute-path-reference",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/ref/absref.json",
"$defs": {
"a": {
Expand Down Expand Up @@ -982,6 +987,7 @@
{
"description": "$id with file URI still resolves pointers - *nix",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "file:///folder/file.json",
"$defs": {
"foo": {
Expand All @@ -1006,6 +1012,7 @@
{
"description": "$id with file URI still resolves pointers - windows",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "file:///c:/folder/file.json",
"$defs": {
"foo": {
Expand All @@ -1030,6 +1037,7 @@
{
"description": "empty tokens in $ref json-pointer",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$defs": {
"": {
"$defs": {
Expand Down
16 changes: 13 additions & 3 deletions tests/draft2019-09/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@
},
{
"description": "remote HTTP ref with different $id",
"schema": {"$ref": "http://localhost:1234/different-id-ref-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://localhost:1234/different-id-ref-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -281,7 +284,10 @@
},
{
"description": "remote HTTP ref with different URN $id",
"schema": {"$ref": "http://localhost:1234/urn-ref-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://localhost:1234/urn-ref-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -297,7 +303,10 @@
},
{
"description": "remote HTTP ref with nested absolute ref",
"schema": {"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -314,6 +323,7 @@
{
"description": "$ref to $ref finds detached $anchor",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$ref": "http://localhost:1234/draft2019-09/detached-ref.json#/$defs/foo"
},
"tests": [
Expand Down
1 change: 1 addition & 0 deletions tests/draft2020-12/dependentSchemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
{
"description": "dependent subschema incompatible with root",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"foo": {}
},
Expand Down
8 changes: 8 additions & 0 deletions tests/draft2020-12/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
{
"description": "URN ref with nested pointer ref",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed",
"$defs": {
"foo": {
Expand All @@ -887,6 +888,7 @@
{
"description": "ref to if",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://example.com/ref/if",
"if": {
"$id": "http://example.com/ref/if",
Expand All @@ -909,6 +911,7 @@
{
"description": "ref to then",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://example.com/ref/then",
"then": {
"$id": "http://example.com/ref/then",
Expand All @@ -931,6 +934,7 @@
{
"description": "ref to else",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://example.com/ref/else",
"else": {
"$id": "http://example.com/ref/else",
Expand All @@ -953,6 +957,7 @@
{
"description": "ref with absolute-path-reference",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://example.com/ref/absref.json",
"$defs": {
"a": {
Expand Down Expand Up @@ -982,6 +987,7 @@
{
"description": "$id with file URI still resolves pointers - *nix",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "file:///folder/file.json",
"$defs": {
"foo": {
Expand All @@ -1006,6 +1012,7 @@
{
"description": "$id with file URI still resolves pointers - windows",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "file:///c:/folder/file.json",
"$defs": {
"foo": {
Expand All @@ -1030,6 +1037,7 @@
{
"description": "empty tokens in $ref json-pointer",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"": {
"$defs": {
Expand Down
16 changes: 13 additions & 3 deletions tests/draft2020-12/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@
},
{
"description": "remote HTTP ref with different $id",
"schema": {"$ref": "http://localhost:1234/different-id-ref-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://localhost:1234/different-id-ref-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -281,7 +284,10 @@
},
{
"description": "remote HTTP ref with different URN $id",
"schema": {"$ref": "http://localhost:1234/urn-ref-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://localhost:1234/urn-ref-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -297,7 +303,10 @@
},
{
"description": "remote HTTP ref with nested absolute ref",
"schema": {"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
},
"tests": [
{
"description": "number is invalid",
Expand All @@ -314,6 +323,7 @@
{
"description": "$ref to $ref finds detached $anchor",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://localhost:1234/draft2020-12/detached-ref.json#/$defs/foo"
},
"tests": [
Expand Down