Skip to content

Commit

Permalink
Squashed 'json/' changes from 4ecd01f3..ba52c48a
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Julian committed Oct 11, 2023
1 parent 64b8c57 commit e6ec2f9
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Node-specific support is maintained in a [separate repository](https://github.co
* [fastjsonschema](https://github.com/seznam/python-fastjsonschema)
* [hypothesis-jsonschema](https://github.com/Zac-HD/hypothesis-jsonschema)
* [jschon](https://github.com/marksparkza/jschon)
* [python-experimental, OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python-experimental.md)
* [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator)

### Ruby

Expand Down
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

0 comments on commit e6ec2f9

Please sign in to comment.