Skip to content

Commit e6ec2f9

Browse files
committed
Squashed 'json/' changes from 4ecd01f3..ba52c48a
ba52c48a Merge pull request #689 from skryukov/add-schema-keyword-to-required-tests d0c602a7 Add $schema keyword to required tests 20f1f52c Merge pull request #688 from spacether/feat_updates_python_exp_impl b087b3ca Updates implmentation git-subtree-dir: json git-subtree-split: ba52c48ac0725d1d5323d8083a5149e1d20e8a40
1 parent 64b8c57 commit e6ec2f9

File tree

10 files changed

+67
-10
lines changed

10 files changed

+67
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Node-specific support is maintained in a [separate repository](https://github.co
313313
* [fastjsonschema](https://github.com/seznam/python-fastjsonschema)
314314
* [hypothesis-jsonschema](https://github.com/Zac-HD/hypothesis-jsonschema)
315315
* [jschon](https://github.com/marksparkza/jschon)
316-
* [python-experimental, OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python-experimental.md)
316+
* [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator)
317317

318318
### Ruby
319319

tests/draft-next/dependentSchemas.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
{
133133
"description": "dependent subschema incompatible with root",
134134
"schema": {
135+
"$schema": "https://json-schema.org/draft/next/schema",
135136
"properties": {
136137
"foo": {}
137138
},

tests/draft-next/ref.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@
862862
{
863863
"description": "URN ref with nested pointer ref",
864864
"schema": {
865+
"$schema": "https://json-schema.org/draft/next/schema",
865866
"$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed",
866867
"$defs": {
867868
"foo": {
@@ -887,6 +888,7 @@
887888
{
888889
"description": "ref to if",
889890
"schema": {
891+
"$schema": "https://json-schema.org/draft/next/schema",
890892
"$ref": "http://example.com/ref/if",
891893
"if": {
892894
"$id": "http://example.com/ref/if",
@@ -909,6 +911,7 @@
909911
{
910912
"description": "ref to then",
911913
"schema": {
914+
"$schema": "https://json-schema.org/draft/next/schema",
912915
"$ref": "http://example.com/ref/then",
913916
"then": {
914917
"$id": "http://example.com/ref/then",
@@ -931,6 +934,7 @@
931934
{
932935
"description": "ref to else",
933936
"schema": {
937+
"$schema": "https://json-schema.org/draft/next/schema",
934938
"$ref": "http://example.com/ref/else",
935939
"else": {
936940
"$id": "http://example.com/ref/else",
@@ -953,6 +957,7 @@
953957
{
954958
"description": "ref with absolute-path-reference",
955959
"schema": {
960+
"$schema": "https://json-schema.org/draft/next/schema",
956961
"$id": "http://example.com/ref/absref.json",
957962
"$defs": {
958963
"a": {
@@ -982,6 +987,7 @@
982987
{
983988
"description": "$id with file URI still resolves pointers - *nix",
984989
"schema": {
990+
"$schema": "https://json-schema.org/draft/next/schema",
985991
"$id": "file:///folder/file.json",
986992
"$defs": {
987993
"foo": {
@@ -1006,6 +1012,7 @@
10061012
{
10071013
"description": "$id with file URI still resolves pointers - windows",
10081014
"schema": {
1015+
"$schema": "https://json-schema.org/draft/next/schema",
10091016
"$id": "file:///c:/folder/file.json",
10101017
"$defs": {
10111018
"foo": {
@@ -1030,6 +1037,7 @@
10301037
{
10311038
"description": "empty tokens in $ref json-pointer",
10321039
"schema": {
1040+
"$schema": "https://json-schema.org/draft/next/schema",
10331041
"$defs": {
10341042
"": {
10351043
"$defs": {

tests/draft-next/refRemote.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@
265265
},
266266
{
267267
"description": "remote HTTP ref with different $id",
268-
"schema": {"$ref": "http://localhost:1234/different-id-ref-string.json"},
268+
"schema": {
269+
"$schema": "https://json-schema.org/draft/next/schema",
270+
"$ref": "http://localhost:1234/different-id-ref-string.json"
271+
},
269272
"tests": [
270273
{
271274
"description": "number is invalid",
@@ -281,7 +284,10 @@
281284
},
282285
{
283286
"description": "remote HTTP ref with different URN $id",
284-
"schema": {"$ref": "http://localhost:1234/urn-ref-string.json"},
287+
"schema": {
288+
"$schema": "https://json-schema.org/draft/next/schema",
289+
"$ref": "http://localhost:1234/urn-ref-string.json"
290+
},
285291
"tests": [
286292
{
287293
"description": "number is invalid",
@@ -297,7 +303,10 @@
297303
},
298304
{
299305
"description": "remote HTTP ref with nested absolute ref",
300-
"schema": {"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"},
306+
"schema": {
307+
"$schema": "https://json-schema.org/draft/next/schema",
308+
"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
309+
},
301310
"tests": [
302311
{
303312
"description": "number is invalid",
@@ -314,6 +323,7 @@
314323
{
315324
"description": "$ref to $ref finds detached $anchor",
316325
"schema": {
326+
"$schema": "https://json-schema.org/draft/next/schema",
317327
"$ref": "http://localhost:1234/draft-next/detached-ref.json#/$defs/foo"
318328
},
319329
"tests": [

tests/draft2019-09/dependentSchemas.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
{
133133
"description": "dependent subschema incompatible with root",
134134
"schema": {
135+
"$schema": "https://json-schema.org/draft/2019-09/schema",
135136
"properties": {
136137
"foo": {}
137138
},

tests/draft2019-09/ref.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@
862862
{
863863
"description": "URN ref with nested pointer ref",
864864
"schema": {
865+
"$schema": "https://json-schema.org/draft/2019-09/schema",
865866
"$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed",
866867
"$defs": {
867868
"foo": {
@@ -887,6 +888,7 @@
887888
{
888889
"description": "ref to if",
889890
"schema": {
891+
"$schema": "https://json-schema.org/draft/2019-09/schema",
890892
"$ref": "http://example.com/ref/if",
891893
"if": {
892894
"$id": "http://example.com/ref/if",
@@ -909,6 +911,7 @@
909911
{
910912
"description": "ref to then",
911913
"schema": {
914+
"$schema": "https://json-schema.org/draft/2019-09/schema",
912915
"$ref": "http://example.com/ref/then",
913916
"then": {
914917
"$id": "http://example.com/ref/then",
@@ -931,6 +934,7 @@
931934
{
932935
"description": "ref to else",
933936
"schema": {
937+
"$schema": "https://json-schema.org/draft/2019-09/schema",
934938
"$ref": "http://example.com/ref/else",
935939
"else": {
936940
"$id": "http://example.com/ref/else",
@@ -953,6 +957,7 @@
953957
{
954958
"description": "ref with absolute-path-reference",
955959
"schema": {
960+
"$schema": "https://json-schema.org/draft/2019-09/schema",
956961
"$id": "http://example.com/ref/absref.json",
957962
"$defs": {
958963
"a": {
@@ -982,6 +987,7 @@
982987
{
983988
"description": "$id with file URI still resolves pointers - *nix",
984989
"schema": {
990+
"$schema": "https://json-schema.org/draft/2019-09/schema",
985991
"$id": "file:///folder/file.json",
986992
"$defs": {
987993
"foo": {
@@ -1006,6 +1012,7 @@
10061012
{
10071013
"description": "$id with file URI still resolves pointers - windows",
10081014
"schema": {
1015+
"$schema": "https://json-schema.org/draft/2019-09/schema",
10091016
"$id": "file:///c:/folder/file.json",
10101017
"$defs": {
10111018
"foo": {
@@ -1030,6 +1037,7 @@
10301037
{
10311038
"description": "empty tokens in $ref json-pointer",
10321039
"schema": {
1040+
"$schema": "https://json-schema.org/draft/2019-09/schema",
10331041
"$defs": {
10341042
"": {
10351043
"$defs": {

tests/draft2019-09/refRemote.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@
265265
},
266266
{
267267
"description": "remote HTTP ref with different $id",
268-
"schema": {"$ref": "http://localhost:1234/different-id-ref-string.json"},
268+
"schema": {
269+
"$schema": "https://json-schema.org/draft/2019-09/schema",
270+
"$ref": "http://localhost:1234/different-id-ref-string.json"
271+
},
269272
"tests": [
270273
{
271274
"description": "number is invalid",
@@ -281,7 +284,10 @@
281284
},
282285
{
283286
"description": "remote HTTP ref with different URN $id",
284-
"schema": {"$ref": "http://localhost:1234/urn-ref-string.json"},
287+
"schema": {
288+
"$schema": "https://json-schema.org/draft/2019-09/schema",
289+
"$ref": "http://localhost:1234/urn-ref-string.json"
290+
},
285291
"tests": [
286292
{
287293
"description": "number is invalid",
@@ -297,7 +303,10 @@
297303
},
298304
{
299305
"description": "remote HTTP ref with nested absolute ref",
300-
"schema": {"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"},
306+
"schema": {
307+
"$schema": "https://json-schema.org/draft/2019-09/schema",
308+
"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
309+
},
301310
"tests": [
302311
{
303312
"description": "number is invalid",
@@ -314,6 +323,7 @@
314323
{
315324
"description": "$ref to $ref finds detached $anchor",
316325
"schema": {
326+
"$schema": "https://json-schema.org/draft/2019-09/schema",
317327
"$ref": "http://localhost:1234/draft2019-09/detached-ref.json#/$defs/foo"
318328
},
319329
"tests": [

tests/draft2020-12/dependentSchemas.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
{
133133
"description": "dependent subschema incompatible with root",
134134
"schema": {
135+
"$schema": "https://json-schema.org/draft/2020-12/schema",
135136
"properties": {
136137
"foo": {}
137138
},

tests/draft2020-12/ref.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@
862862
{
863863
"description": "URN ref with nested pointer ref",
864864
"schema": {
865+
"$schema": "https://json-schema.org/draft/2020-12/schema",
865866
"$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed",
866867
"$defs": {
867868
"foo": {
@@ -887,6 +888,7 @@
887888
{
888889
"description": "ref to if",
889890
"schema": {
891+
"$schema": "https://json-schema.org/draft/2020-12/schema",
890892
"$ref": "http://example.com/ref/if",
891893
"if": {
892894
"$id": "http://example.com/ref/if",
@@ -909,6 +911,7 @@
909911
{
910912
"description": "ref to then",
911913
"schema": {
914+
"$schema": "https://json-schema.org/draft/2020-12/schema",
912915
"$ref": "http://example.com/ref/then",
913916
"then": {
914917
"$id": "http://example.com/ref/then",
@@ -931,6 +934,7 @@
931934
{
932935
"description": "ref to else",
933936
"schema": {
937+
"$schema": "https://json-schema.org/draft/2020-12/schema",
934938
"$ref": "http://example.com/ref/else",
935939
"else": {
936940
"$id": "http://example.com/ref/else",
@@ -953,6 +957,7 @@
953957
{
954958
"description": "ref with absolute-path-reference",
955959
"schema": {
960+
"$schema": "https://json-schema.org/draft/2020-12/schema",
956961
"$id": "http://example.com/ref/absref.json",
957962
"$defs": {
958963
"a": {
@@ -982,6 +987,7 @@
982987
{
983988
"description": "$id with file URI still resolves pointers - *nix",
984989
"schema": {
990+
"$schema": "https://json-schema.org/draft/2020-12/schema",
985991
"$id": "file:///folder/file.json",
986992
"$defs": {
987993
"foo": {
@@ -1006,6 +1012,7 @@
10061012
{
10071013
"description": "$id with file URI still resolves pointers - windows",
10081014
"schema": {
1015+
"$schema": "https://json-schema.org/draft/2020-12/schema",
10091016
"$id": "file:///c:/folder/file.json",
10101017
"$defs": {
10111018
"foo": {
@@ -1030,6 +1037,7 @@
10301037
{
10311038
"description": "empty tokens in $ref json-pointer",
10321039
"schema": {
1040+
"$schema": "https://json-schema.org/draft/2020-12/schema",
10331041
"$defs": {
10341042
"": {
10351043
"$defs": {

tests/draft2020-12/refRemote.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@
265265
},
266266
{
267267
"description": "remote HTTP ref with different $id",
268-
"schema": {"$ref": "http://localhost:1234/different-id-ref-string.json"},
268+
"schema": {
269+
"$schema": "https://json-schema.org/draft/2020-12/schema",
270+
"$ref": "http://localhost:1234/different-id-ref-string.json"
271+
},
269272
"tests": [
270273
{
271274
"description": "number is invalid",
@@ -281,7 +284,10 @@
281284
},
282285
{
283286
"description": "remote HTTP ref with different URN $id",
284-
"schema": {"$ref": "http://localhost:1234/urn-ref-string.json"},
287+
"schema": {
288+
"$schema": "https://json-schema.org/draft/2020-12/schema",
289+
"$ref": "http://localhost:1234/urn-ref-string.json"
290+
},
285291
"tests": [
286292
{
287293
"description": "number is invalid",
@@ -297,7 +303,10 @@
297303
},
298304
{
299305
"description": "remote HTTP ref with nested absolute ref",
300-
"schema": {"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"},
306+
"schema": {
307+
"$schema": "https://json-schema.org/draft/2020-12/schema",
308+
"$ref": "http://localhost:1234/nested-absolute-ref-to-string.json"
309+
},
301310
"tests": [
302311
{
303312
"description": "number is invalid",
@@ -314,6 +323,7 @@
314323
{
315324
"description": "$ref to $ref finds detached $anchor",
316325
"schema": {
326+
"$schema": "https://json-schema.org/draft/2020-12/schema",
317327
"$ref": "http://localhost:1234/draft2020-12/detached-ref.json#/$defs/foo"
318328
},
319329
"tests": [

0 commit comments

Comments
 (0)