diff options
author | Julian Berman <Julian@GrayVines.com> | 2019-09-22 12:55:37 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2019-09-22 12:55:37 -0400 |
commit | 694f883aad6d6a31083229fa47a4e27658075622 (patch) | |
tree | 25df1545128ebb70b28ea2bf9c908cb504790575 /json/tests | |
parent | 601168ca8aa41f39cf46953a6bee89e7c6f127a4 (diff) | |
parent | a5a5a45cfa7ac901462ca8afcab544f3c2de9e1d (diff) | |
download | jsonschema-694f883aad6d6a31083229fa47a4e27658075622.tar.gz |
Merge commit 'a5a5a45cfa7ac901462ca8afcab544f3c2de9e1d'
* commit 'a5a5a45cfa7ac901462ca8afcab544f3c2de9e1d':
Squashed 'json/' changes from 6b673312..2903943b
Diffstat (limited to 'json/tests')
-rw-r--r-- | json/tests/draft2019-09/additionalItems.json (renamed from json/tests/draft2019-08/additionalItems.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/additionalProperties.json (renamed from json/tests/draft2019-08/additionalProperties.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/allOf.json (renamed from json/tests/draft2019-08/allOf.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/anyOf.json (renamed from json/tests/draft2019-08/anyOf.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/boolean_schema.json (renamed from json/tests/draft2019-08/boolean_schema.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/const.json (renamed from json/tests/draft2019-08/const.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/contains.json (renamed from json/tests/draft2019-08/contains.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/default.json (renamed from json/tests/draft2019-08/default.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/defs.json (renamed from json/tests/draft2019-08/defs.json) | 4 | ||||
-rw-r--r-- | json/tests/draft2019-09/dependencies.json (renamed from json/tests/draft2019-08/dependencies.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/enum.json (renamed from json/tests/draft2019-08/enum.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/exclusiveMaximum.json (renamed from json/tests/draft2019-08/exclusiveMaximum.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/exclusiveMinimum.json (renamed from json/tests/draft2019-08/exclusiveMinimum.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/format.json | 614 | ||||
-rw-r--r-- | json/tests/draft2019-09/if-then-else.json (renamed from json/tests/draft2019-08/if-then-else.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/items.json (renamed from json/tests/draft2019-08/items.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/maxItems.json (renamed from json/tests/draft2019-08/maxItems.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/maxLength.json (renamed from json/tests/draft2019-08/maxLength.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/maxProperties.json (renamed from json/tests/draft2019-08/maxProperties.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/maximum.json (renamed from json/tests/draft2019-08/maximum.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/minItems.json (renamed from json/tests/draft2019-08/minItems.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/minLength.json (renamed from json/tests/draft2019-08/minLength.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/minProperties.json (renamed from json/tests/draft2019-08/minProperties.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/minimum.json (renamed from json/tests/draft2019-08/minimum.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/multipleOf.json (renamed from json/tests/draft2019-08/multipleOf.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/not.json (renamed from json/tests/draft2019-08/not.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/oneOf.json (renamed from json/tests/draft2019-08/oneOf.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/bignum.json (renamed from json/tests/draft2019-08/optional/bignum.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/content.json (renamed from json/tests/draft2019-08/optional/content.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/ecmascript-regex.json (renamed from json/tests/draft2019-08/optional/ecmascript-regex.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/date-time.json (renamed from json/tests/draft2019-08/optional/format/date-time.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/date.json (renamed from json/tests/draft2019-08/optional/format/date.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/email.json (renamed from json/tests/draft2019-08/optional/format/email.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/hostname.json (renamed from json/tests/draft2019-08/optional/format/hostname.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/idn-email.json (renamed from json/tests/draft2019-08/optional/format/idn-email.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/idn-hostname.json (renamed from json/tests/draft2019-08/optional/format/idn-hostname.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/ipv4.json (renamed from json/tests/draft2019-08/optional/format/ipv4.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/ipv6.json (renamed from json/tests/draft2019-08/optional/format/ipv6.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/iri-reference.json (renamed from json/tests/draft2019-08/optional/format/iri-reference.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/iri.json (renamed from json/tests/draft2019-08/optional/format/iri.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/json-pointer.json (renamed from json/tests/draft2019-08/optional/format/json-pointer.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/regex.json (renamed from json/tests/draft2019-08/optional/format/regex.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/relative-json-pointer.json (renamed from json/tests/draft2019-08/optional/format/relative-json-pointer.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/time.json (renamed from json/tests/draft2019-08/optional/format/time.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/uri-reference.json (renamed from json/tests/draft2019-08/optional/format/uri-reference.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/uri-template.json (renamed from json/tests/draft2019-08/optional/format/uri-template.json) | 4 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/format/uri.json (renamed from json/tests/draft2019-08/optional/format/uri.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/optional/zeroTerminatedFloats.json (renamed from json/tests/draft2019-08/optional/zeroTerminatedFloats.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/pattern.json (renamed from json/tests/draft2019-08/pattern.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/patternProperties.json (renamed from json/tests/draft2019-08/patternProperties.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/properties.json (renamed from json/tests/draft2019-08/properties.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/propertyNames.json (renamed from json/tests/draft2019-08/propertyNames.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/ref.json (renamed from json/tests/draft2019-08/ref.json) | 2 | ||||
-rw-r--r-- | json/tests/draft2019-09/refRemote.json (renamed from json/tests/draft2019-08/refRemote.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/required.json (renamed from json/tests/draft2019-08/required.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/type.json (renamed from json/tests/draft2019-08/type.json) | 0 | ||||
-rw-r--r-- | json/tests/draft2019-09/uniqueItems.json (renamed from json/tests/draft2019-08/uniqueItems.json) | 0 | ||||
-rw-r--r-- | json/tests/draft3/format.json | 362 | ||||
-rw-r--r-- | json/tests/draft4/format.json | 218 | ||||
-rw-r--r-- | json/tests/draft6/format.json | 326 | ||||
-rw-r--r-- | json/tests/draft6/optional/format.json | 4 | ||||
-rw-r--r-- | json/tests/draft7/format.json | 614 | ||||
-rw-r--r-- | json/tests/draft7/optional/format/uri-template.json | 4 |
63 files changed, 2140 insertions, 12 deletions
diff --git a/json/tests/draft2019-08/additionalItems.json b/json/tests/draft2019-09/additionalItems.json index abecc57..abecc57 100644 --- a/json/tests/draft2019-08/additionalItems.json +++ b/json/tests/draft2019-09/additionalItems.json diff --git a/json/tests/draft2019-08/additionalProperties.json b/json/tests/draft2019-09/additionalProperties.json index ffeac6b..ffeac6b 100644 --- a/json/tests/draft2019-08/additionalProperties.json +++ b/json/tests/draft2019-09/additionalProperties.json diff --git a/json/tests/draft2019-08/allOf.json b/json/tests/draft2019-09/allOf.json index eb61209..eb61209 100644 --- a/json/tests/draft2019-08/allOf.json +++ b/json/tests/draft2019-09/allOf.json diff --git a/json/tests/draft2019-08/anyOf.json b/json/tests/draft2019-09/anyOf.json index ab5eb38..ab5eb38 100644 --- a/json/tests/draft2019-08/anyOf.json +++ b/json/tests/draft2019-09/anyOf.json diff --git a/json/tests/draft2019-08/boolean_schema.json b/json/tests/draft2019-09/boolean_schema.json index 6d40f23..6d40f23 100644 --- a/json/tests/draft2019-08/boolean_schema.json +++ b/json/tests/draft2019-09/boolean_schema.json diff --git a/json/tests/draft2019-08/const.json b/json/tests/draft2019-09/const.json index c089625..c089625 100644 --- a/json/tests/draft2019-08/const.json +++ b/json/tests/draft2019-09/const.json diff --git a/json/tests/draft2019-08/contains.json b/json/tests/draft2019-09/contains.json index b7ae5a2..b7ae5a2 100644 --- a/json/tests/draft2019-08/contains.json +++ b/json/tests/draft2019-09/contains.json diff --git a/json/tests/draft2019-08/default.json b/json/tests/draft2019-09/default.json index 1762977..1762977 100644 --- a/json/tests/draft2019-08/default.json +++ b/json/tests/draft2019-09/default.json diff --git a/json/tests/draft2019-08/defs.json b/json/tests/draft2019-09/defs.json index e3c298d..f2fbec4 100644 --- a/json/tests/draft2019-08/defs.json +++ b/json/tests/draft2019-09/defs.json @@ -1,7 +1,7 @@ [ { "description": "valid definition", - "schema": {"$ref": "http://json-schema.org/draft/2019-06/schema#"}, + "schema": {"$ref": "https://json-schema.org/draft/2019-09/schema"}, "tests": [ { "description": "valid definition schema", @@ -12,7 +12,7 @@ }, { "description": "invalid definition", - "schema": {"$ref": "http://json-schema.org/draft/2019-06/schema#"}, + "schema": {"$ref": "https://json-schema.org/draft/2019-09/schema"}, "tests": [ { "description": "invalid definition schema", diff --git a/json/tests/draft2019-08/dependencies.json b/json/tests/draft2019-09/dependencies.json index 8dd78aa..8dd78aa 100644 --- a/json/tests/draft2019-08/dependencies.json +++ b/json/tests/draft2019-09/dependencies.json diff --git a/json/tests/draft2019-08/enum.json b/json/tests/draft2019-09/enum.json index 32d7902..32d7902 100644 --- a/json/tests/draft2019-08/enum.json +++ b/json/tests/draft2019-09/enum.json diff --git a/json/tests/draft2019-08/exclusiveMaximum.json b/json/tests/draft2019-09/exclusiveMaximum.json index dc3cd70..dc3cd70 100644 --- a/json/tests/draft2019-08/exclusiveMaximum.json +++ b/json/tests/draft2019-09/exclusiveMaximum.json diff --git a/json/tests/draft2019-08/exclusiveMinimum.json b/json/tests/draft2019-09/exclusiveMinimum.json index b38d7ec..b38d7ec 100644 --- a/json/tests/draft2019-08/exclusiveMinimum.json +++ b/json/tests/draft2019-09/exclusiveMinimum.json diff --git a/json/tests/draft2019-09/format.json b/json/tests/draft2019-09/format.json new file mode 100644 index 0000000..93305f5 --- /dev/null +++ b/json/tests/draft2019-09/format.json @@ -0,0 +1,614 @@ +[ + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IDN e-mail addresses", + "schema": {"format": "idn-email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of regexes", + "schema": {"format": "regex"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ipv4"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IDN hostnames", + "schema": {"format": "idn-hostname"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of hostnames", + "schema": {"format": "hostname"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date strings", + "schema": {"format": "date"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of time strings", + "schema": {"format": "time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of JSON pointers", + "schema": {"format": "json-pointer"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of relative JSON pointers", + "schema": {"format": "relative-json-pointer"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IRIs", + "schema": {"format": "iri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IRI references", + "schema": {"format": "iri-reference"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URI references", + "schema": {"format": "uri-reference"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URI templates", + "schema": {"format": "uri-template"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + } +] diff --git a/json/tests/draft2019-08/if-then-else.json b/json/tests/draft2019-09/if-then-else.json index be73281..be73281 100644 --- a/json/tests/draft2019-08/if-then-else.json +++ b/json/tests/draft2019-09/if-then-else.json diff --git a/json/tests/draft2019-08/items.json b/json/tests/draft2019-09/items.json index 6e98ee8..6e98ee8 100644 --- a/json/tests/draft2019-08/items.json +++ b/json/tests/draft2019-09/items.json diff --git a/json/tests/draft2019-08/maxItems.json b/json/tests/draft2019-09/maxItems.json index 3b53a6b..3b53a6b 100644 --- a/json/tests/draft2019-08/maxItems.json +++ b/json/tests/draft2019-09/maxItems.json diff --git a/json/tests/draft2019-08/maxLength.json b/json/tests/draft2019-09/maxLength.json index 811d35b..811d35b 100644 --- a/json/tests/draft2019-08/maxLength.json +++ b/json/tests/draft2019-09/maxLength.json diff --git a/json/tests/draft2019-08/maxProperties.json b/json/tests/draft2019-09/maxProperties.json index 513731e..513731e 100644 --- a/json/tests/draft2019-08/maxProperties.json +++ b/json/tests/draft2019-09/maxProperties.json diff --git a/json/tests/draft2019-08/maximum.json b/json/tests/draft2019-09/maximum.json index 8150984..8150984 100644 --- a/json/tests/draft2019-08/maximum.json +++ b/json/tests/draft2019-09/maximum.json diff --git a/json/tests/draft2019-08/minItems.json b/json/tests/draft2019-09/minItems.json index ed51188..ed51188 100644 --- a/json/tests/draft2019-08/minItems.json +++ b/json/tests/draft2019-09/minItems.json diff --git a/json/tests/draft2019-08/minLength.json b/json/tests/draft2019-09/minLength.json index 3f09158..3f09158 100644 --- a/json/tests/draft2019-08/minLength.json +++ b/json/tests/draft2019-09/minLength.json diff --git a/json/tests/draft2019-08/minProperties.json b/json/tests/draft2019-09/minProperties.json index 49a0726..49a0726 100644 --- a/json/tests/draft2019-08/minProperties.json +++ b/json/tests/draft2019-09/minProperties.json diff --git a/json/tests/draft2019-08/minimum.json b/json/tests/draft2019-09/minimum.json index 2a9c42b..2a9c42b 100644 --- a/json/tests/draft2019-08/minimum.json +++ b/json/tests/draft2019-09/minimum.json diff --git a/json/tests/draft2019-08/multipleOf.json b/json/tests/draft2019-09/multipleOf.json index ca3b761..ca3b761 100644 --- a/json/tests/draft2019-08/multipleOf.json +++ b/json/tests/draft2019-09/multipleOf.json diff --git a/json/tests/draft2019-08/not.json b/json/tests/draft2019-09/not.json index 98de0ed..98de0ed 100644 --- a/json/tests/draft2019-08/not.json +++ b/json/tests/draft2019-09/not.json diff --git a/json/tests/draft2019-08/oneOf.json b/json/tests/draft2019-09/oneOf.json index 57640b7..57640b7 100644 --- a/json/tests/draft2019-08/oneOf.json +++ b/json/tests/draft2019-09/oneOf.json diff --git a/json/tests/draft2019-08/optional/bignum.json b/json/tests/draft2019-09/optional/bignum.json index fac275e..fac275e 100644 --- a/json/tests/draft2019-08/optional/bignum.json +++ b/json/tests/draft2019-09/optional/bignum.json diff --git a/json/tests/draft2019-08/optional/content.json b/json/tests/draft2019-09/optional/content.json index 3f5a743..3f5a743 100644 --- a/json/tests/draft2019-08/optional/content.json +++ b/json/tests/draft2019-09/optional/content.json diff --git a/json/tests/draft2019-08/optional/ecmascript-regex.json b/json/tests/draft2019-09/optional/ecmascript-regex.json index 08dc936..08dc936 100644 --- a/json/tests/draft2019-08/optional/ecmascript-regex.json +++ b/json/tests/draft2019-09/optional/ecmascript-regex.json diff --git a/json/tests/draft2019-08/optional/format/date-time.json b/json/tests/draft2019-09/optional/format/date-time.json index dfccee6..dfccee6 100644 --- a/json/tests/draft2019-08/optional/format/date-time.json +++ b/json/tests/draft2019-09/optional/format/date-time.json diff --git a/json/tests/draft2019-08/optional/format/date.json b/json/tests/draft2019-09/optional/format/date.json index cd23baa..cd23baa 100644 --- a/json/tests/draft2019-08/optional/format/date.json +++ b/json/tests/draft2019-09/optional/format/date.json diff --git a/json/tests/draft2019-08/optional/format/email.json b/json/tests/draft2019-09/optional/format/email.json index c837c84..c837c84 100644 --- a/json/tests/draft2019-08/optional/format/email.json +++ b/json/tests/draft2019-09/optional/format/email.json diff --git a/json/tests/draft2019-08/optional/format/hostname.json b/json/tests/draft2019-09/optional/format/hostname.json index d22e57d..d22e57d 100644 --- a/json/tests/draft2019-08/optional/format/hostname.json +++ b/json/tests/draft2019-09/optional/format/hostname.json diff --git a/json/tests/draft2019-08/optional/format/idn-email.json b/json/tests/draft2019-09/optional/format/idn-email.json index 637409e..637409e 100644 --- a/json/tests/draft2019-08/optional/format/idn-email.json +++ b/json/tests/draft2019-09/optional/format/idn-email.json diff --git a/json/tests/draft2019-08/optional/format/idn-hostname.json b/json/tests/draft2019-09/optional/format/idn-hostname.json index 3291820..3291820 100644 --- a/json/tests/draft2019-08/optional/format/idn-hostname.json +++ b/json/tests/draft2019-09/optional/format/idn-hostname.json diff --git a/json/tests/draft2019-08/optional/format/ipv4.json b/json/tests/draft2019-09/optional/format/ipv4.json index 661148a..661148a 100644 --- a/json/tests/draft2019-08/optional/format/ipv4.json +++ b/json/tests/draft2019-09/optional/format/ipv4.json diff --git a/json/tests/draft2019-08/optional/format/ipv6.json b/json/tests/draft2019-09/optional/format/ipv6.json index f67559b..f67559b 100644 --- a/json/tests/draft2019-08/optional/format/ipv6.json +++ b/json/tests/draft2019-09/optional/format/ipv6.json diff --git a/json/tests/draft2019-08/optional/format/iri-reference.json b/json/tests/draft2019-09/optional/format/iri-reference.json index 1fd779c..1fd779c 100644 --- a/json/tests/draft2019-08/optional/format/iri-reference.json +++ b/json/tests/draft2019-09/optional/format/iri-reference.json diff --git a/json/tests/draft2019-08/optional/format/iri.json b/json/tests/draft2019-09/optional/format/iri.json index ed54094..ed54094 100644 --- a/json/tests/draft2019-08/optional/format/iri.json +++ b/json/tests/draft2019-09/optional/format/iri.json diff --git a/json/tests/draft2019-08/optional/format/json-pointer.json b/json/tests/draft2019-09/optional/format/json-pointer.json index 65c2f06..65c2f06 100644 --- a/json/tests/draft2019-08/optional/format/json-pointer.json +++ b/json/tests/draft2019-09/optional/format/json-pointer.json diff --git a/json/tests/draft2019-08/optional/format/regex.json b/json/tests/draft2019-09/optional/format/regex.json index d99d021..d99d021 100644 --- a/json/tests/draft2019-08/optional/format/regex.json +++ b/json/tests/draft2019-09/optional/format/regex.json diff --git a/json/tests/draft2019-08/optional/format/relative-json-pointer.json b/json/tests/draft2019-09/optional/format/relative-json-pointer.json index ceeb743..ceeb743 100644 --- a/json/tests/draft2019-08/optional/format/relative-json-pointer.json +++ b/json/tests/draft2019-09/optional/format/relative-json-pointer.json diff --git a/json/tests/draft2019-08/optional/format/time.json b/json/tests/draft2019-09/optional/format/time.json index 4ec8a01..4ec8a01 100644 --- a/json/tests/draft2019-08/optional/format/time.json +++ b/json/tests/draft2019-09/optional/format/time.json diff --git a/json/tests/draft2019-08/optional/format/uri-reference.json b/json/tests/draft2019-09/optional/format/uri-reference.json index e4c9eef..e4c9eef 100644 --- a/json/tests/draft2019-08/optional/format/uri-reference.json +++ b/json/tests/draft2019-09/optional/format/uri-reference.json diff --git a/json/tests/draft2019-08/optional/format/uri-template.json b/json/tests/draft2019-09/optional/format/uri-template.json index d8396a5..33ab76e 100644 --- a/json/tests/draft2019-08/optional/format/uri-template.json +++ b/json/tests/draft2019-09/optional/format/uri-template.json @@ -1,9 +1,7 @@ [ { "description": "format: uri-template", - "schema": { - "format": "uri-template" - }, + "schema": {"format": "uri-template"}, "tests": [ { "description": "a valid uri-template", diff --git a/json/tests/draft2019-08/optional/format/uri.json b/json/tests/draft2019-09/optional/format/uri.json index 25cc40c..25cc40c 100644 --- a/json/tests/draft2019-08/optional/format/uri.json +++ b/json/tests/draft2019-09/optional/format/uri.json diff --git a/json/tests/draft2019-08/optional/zeroTerminatedFloats.json b/json/tests/draft2019-09/optional/zeroTerminatedFloats.json index 1bcdf96..1bcdf96 100644 --- a/json/tests/draft2019-08/optional/zeroTerminatedFloats.json +++ b/json/tests/draft2019-09/optional/zeroTerminatedFloats.json diff --git a/json/tests/draft2019-08/pattern.json b/json/tests/draft2019-09/pattern.json index 25e7299..25e7299 100644 --- a/json/tests/draft2019-08/pattern.json +++ b/json/tests/draft2019-09/pattern.json diff --git a/json/tests/draft2019-08/patternProperties.json b/json/tests/draft2019-09/patternProperties.json index 1d04a16..1d04a16 100644 --- a/json/tests/draft2019-08/patternProperties.json +++ b/json/tests/draft2019-09/patternProperties.json diff --git a/json/tests/draft2019-08/properties.json b/json/tests/draft2019-09/properties.json index b86c181..b86c181 100644 --- a/json/tests/draft2019-08/properties.json +++ b/json/tests/draft2019-09/properties.json diff --git a/json/tests/draft2019-08/propertyNames.json b/json/tests/draft2019-09/propertyNames.json index 8423690..8423690 100644 --- a/json/tests/draft2019-08/propertyNames.json +++ b/json/tests/draft2019-09/propertyNames.json diff --git a/json/tests/draft2019-08/ref.json b/json/tests/draft2019-09/ref.json index dbeb7d3..d872426 100644 --- a/json/tests/draft2019-08/ref.json +++ b/json/tests/draft2019-09/ref.json @@ -175,7 +175,7 @@ }, { "description": "remote ref, containing refs itself", - "schema": {"$ref": "http://json-schema.org/draft/2019-06/schema#"}, + "schema": {"$ref": "https://json-schema.org/draft/2019-09/schema"}, "tests": [ { "description": "remote ref valid", diff --git a/json/tests/draft2019-08/refRemote.json b/json/tests/draft2019-09/refRemote.json index 9cadc92..9cadc92 100644 --- a/json/tests/draft2019-08/refRemote.json +++ b/json/tests/draft2019-09/refRemote.json diff --git a/json/tests/draft2019-08/required.json b/json/tests/draft2019-09/required.json index abf18f3..abf18f3 100644 --- a/json/tests/draft2019-08/required.json +++ b/json/tests/draft2019-09/required.json diff --git a/json/tests/draft2019-08/type.json b/json/tests/draft2019-09/type.json index ea33b18..ea33b18 100644 --- a/json/tests/draft2019-08/type.json +++ b/json/tests/draft2019-09/type.json diff --git a/json/tests/draft2019-08/uniqueItems.json b/json/tests/draft2019-09/uniqueItems.json index 8885ed0..8885ed0 100644 --- a/json/tests/draft2019-08/uniqueItems.json +++ b/json/tests/draft2019-09/uniqueItems.json diff --git a/json/tests/draft3/format.json b/json/tests/draft3/format.json new file mode 100644 index 0000000..8279336 --- /dev/null +++ b/json/tests/draft3/format.json @@ -0,0 +1,362 @@ +[ + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ip-address"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of hostnames", + "schema": {"format": "host-name"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of regular expressions", + "schema": {"format": "regex"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date strings", + "schema": {"format": "date"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of time strings", + "schema": {"format": "time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of CSS colors", + "schema": {"format": "color"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + } +] diff --git a/json/tests/draft4/format.json b/json/tests/draft4/format.json new file mode 100644 index 0000000..61e4b62 --- /dev/null +++ b/json/tests/draft4/format.json @@ -0,0 +1,218 @@ +[ + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ipv4"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of hostnames", + "schema": {"format": "hostname"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + } +] diff --git a/json/tests/draft6/format.json b/json/tests/draft6/format.json new file mode 100644 index 0000000..32e8152 --- /dev/null +++ b/json/tests/draft6/format.json @@ -0,0 +1,326 @@ +[ + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ipv4"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of hostnames", + "schema": {"format": "hostname"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of JSON pointers", + "schema": {"format": "json-pointer"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URI references", + "schema": {"format": "uri-reference"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URI templates", + "schema": {"format": "uri-template"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + } +] diff --git a/json/tests/draft6/optional/format.json b/json/tests/draft6/optional/format.json index 74743ff..3dd265f 100644 --- a/json/tests/draft6/optional/format.json +++ b/json/tests/draft6/optional/format.json @@ -199,9 +199,7 @@ }, { "description": "format: uri-template", - "schema": { - "format": "uri-template" - }, + "schema": {"format": "uri-template"}, "tests": [ { "description": "a valid uri-template", diff --git a/json/tests/draft7/format.json b/json/tests/draft7/format.json new file mode 100644 index 0000000..93305f5 --- /dev/null +++ b/json/tests/draft7/format.json @@ -0,0 +1,614 @@ +[ + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IDN e-mail addresses", + "schema": {"format": "idn-email"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of regexes", + "schema": {"format": "regex"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ipv4"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IDN hostnames", + "schema": {"format": "idn-hostname"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of hostnames", + "schema": {"format": "hostname"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date strings", + "schema": {"format": "date"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of time strings", + "schema": {"format": "time"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of JSON pointers", + "schema": {"format": "json-pointer"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of relative JSON pointers", + "schema": {"format": "relative-json-pointer"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IRIs", + "schema": {"format": "iri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of IRI references", + "schema": {"format": "iri-reference"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URI references", + "schema": {"format": "uri-reference"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + }, + { + "description": "validation of URI templates", + "schema": {"format": "uri-template"}, + "tests": [ + { + "description": "ignores integers", + "data": 12, + "valid": true + }, + { + "description": "ignores floats", + "data": 13.7, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores booleans", + "data": false, + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true + } + ] + } +] diff --git a/json/tests/draft7/optional/format/uri-template.json b/json/tests/draft7/optional/format/uri-template.json index d8396a5..33ab76e 100644 --- a/json/tests/draft7/optional/format/uri-template.json +++ b/json/tests/draft7/optional/format/uri-template.json @@ -1,9 +1,7 @@ [ { "description": "format: uri-template", - "schema": { - "format": "uri-template" - }, + "schema": {"format": "uri-template"}, "tests": [ { "description": "a valid uri-template", |