diff options
author | Julian Berman <Julian@GrayVines.com> | 2021-06-29 09:59:08 +0200 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2021-06-29 09:59:08 +0200 |
commit | 02434de22eb0fb4eb60744c5f38c4895b5d4dd02 (patch) | |
tree | 0d8da906d93366461ff22192544e2872371a087d | |
parent | 4e76fb6ae3c1f77d12bca82e4f92691dd57cac15 (diff) | |
download | jsonschema-02434de22eb0fb4eb60744c5f38c4895b5d4dd02.tar.gz |
Squashed 'json/' changes from 1326f36e..17fa9589
17fa9589 Merge pull request #494 from anexia-it/master
a0d28fdf Extend duration and uuid format tests for ignored values
b6769f2b fix ids in older drafts
git-subtree-dir: json
git-subtree-split: 17fa958927a0ef5ba9d26bff8358c03f082476e7
-rw-r--r-- | tests/draft2019-09/optional/format/duration.json | 20 | ||||
-rw-r--r-- | tests/draft2019-09/optional/format/uuid.json | 20 | ||||
-rw-r--r-- | tests/draft2020-12/optional/format/duration.json | 20 | ||||
-rw-r--r-- | tests/draft2020-12/optional/format/uuid.json | 20 | ||||
-rw-r--r-- | tests/draft3/ref.json | 10 | ||||
-rw-r--r-- | tests/draft4/ref.json | 10 |
6 files changed, 90 insertions, 10 deletions
diff --git a/tests/draft2019-09/optional/format/duration.json b/tests/draft2019-09/optional/format/duration.json index 4514738..b8124d7 100644 --- a/tests/draft2019-09/optional/format/duration.json +++ b/tests/draft2019-09/optional/format/duration.json @@ -87,6 +87,26 @@ "description": "weeks cannot be combined with other units", "data": "P1Y2W", "valid": false + }, + { + "description": "null value should be ignored", + "data": null, + "valid": true + }, + { + "description": "number value should be ignored", + "data": 1, + "valid": true + }, + { + "description": "list value should be ignored", + "data": [], + "valid": true + }, + { + "description": "object value should be ignored", + "data": {}, + "valid": true } ] } diff --git a/tests/draft2019-09/optional/format/uuid.json b/tests/draft2019-09/optional/format/uuid.json index 45bf349..3d0f0e7 100644 --- a/tests/draft2019-09/optional/format/uuid.json +++ b/tests/draft2019-09/optional/format/uuid.json @@ -64,6 +64,26 @@ "description": "hypothetical version 15", "data": "99c17cbb-656f-f64a-940f-1a4568f03487", "valid": true + }, + { + "description": "null value should be ignored", + "data": null, + "valid": true + }, + { + "description": "number value should be ignored", + "data": 1, + "valid": true + }, + { + "description": "list value should be ignored", + "data": [], + "valid": true + }, + { + "description": "object value should be ignored", + "data": {}, + "valid": true } ] } diff --git a/tests/draft2020-12/optional/format/duration.json b/tests/draft2020-12/optional/format/duration.json index 4514738..b8124d7 100644 --- a/tests/draft2020-12/optional/format/duration.json +++ b/tests/draft2020-12/optional/format/duration.json @@ -87,6 +87,26 @@ "description": "weeks cannot be combined with other units", "data": "P1Y2W", "valid": false + }, + { + "description": "null value should be ignored", + "data": null, + "valid": true + }, + { + "description": "number value should be ignored", + "data": 1, + "valid": true + }, + { + "description": "list value should be ignored", + "data": [], + "valid": true + }, + { + "description": "object value should be ignored", + "data": {}, + "valid": true } ] } diff --git a/tests/draft2020-12/optional/format/uuid.json b/tests/draft2020-12/optional/format/uuid.json index 45bf349..3d0f0e7 100644 --- a/tests/draft2020-12/optional/format/uuid.json +++ b/tests/draft2020-12/optional/format/uuid.json @@ -64,6 +64,26 @@ "description": "hypothetical version 15", "data": "99c17cbb-656f-f64a-940f-1a4568f03487", "valid": true + }, + { + "description": "null value should be ignored", + "data": null, + "valid": true + }, + { + "description": "number value should be ignored", + "data": 1, + "valid": true + }, + { + "description": "list value should be ignored", + "data": [], + "valid": true + }, + { + "description": "object value should be ignored", + "data": {}, + "valid": true } ] } diff --git a/tests/draft3/ref.json b/tests/draft3/ref.json index 760b771..46dd82d 100644 --- a/tests/draft3/ref.json +++ b/tests/draft3/ref.json @@ -201,24 +201,24 @@ ] }, { - "description": "$ref prevents a sibling $id from changing the base uri", + "description": "$ref prevents a sibling id from changing the base uri", "schema": { - "$id": "http://localhost:1234/sibling_id/base/", + "id": "http://localhost:1234/sibling_id/base/", "definitions": { "foo": { - "$id": "http://localhost:1234/sibling_id/foo.json", + "id": "http://localhost:1234/sibling_id/foo.json", "minimum": 2 }, "base_foo": { "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", - "$id": "foo.json", + "id": "foo.json", "minimum": 5 } }, "allOf": [ { "$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not ttp://localhost:1234/sibling_id/foo.json", - "$id": "http://localhost:1234/sibling_id/", + "id": "http://localhost:1234/sibling_id/", "$ref": "foo.json" } ] diff --git a/tests/draft4/ref.json b/tests/draft4/ref.json index ae3770b..7f5a211 100644 --- a/tests/draft4/ref.json +++ b/tests/draft4/ref.json @@ -176,24 +176,24 @@ ] }, { - "description": "$ref prevents a sibling $id from changing the base uri", + "description": "$ref prevents a sibling id from changing the base uri", "schema": { - "$id": "http://localhost:1234/sibling_id/base/", + "id": "http://localhost:1234/sibling_id/base/", "definitions": { "foo": { - "$id": "http://localhost:1234/sibling_id/foo.json", + "id": "http://localhost:1234/sibling_id/foo.json", "minimum": 2 }, "base_foo": { "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", - "$id": "foo.json", + "id": "foo.json", "minimum": 5 } }, "allOf": [ { "$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not ttp://localhost:1234/sibling_id/foo.json", - "$id": "http://localhost:1234/sibling_id/", + "id": "http://localhost:1234/sibling_id/", "$ref": "foo.json" } ] |