diff --git a/tests/draft-future/optional/format/date-time.json b/tests/draft-future/optional/format/date-time.json index 5f911efe..119179ca 100644 --- a/tests/draft-future/optional/format/date-time.json +++ b/tests/draft-future/optional/format/date-time.json @@ -1,8 +1,38 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", @@ -33,6 +63,11 @@ "data": "1990-12-31T15:59:60-24:00", "valid": false }, + { + "description": "an invalid closing Z after time-zone offset", + "data": "1963-06-19T08:30:06.28123+01:00Z", + "valid": false + }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", diff --git a/tests/draft-future/optional/format/date.json b/tests/draft-future/optional/format/date.json index 6cc2feb8..b4f61eed 100644 --- a/tests/draft-future/optional/format/date.json +++ b/tests/draft-future/optional/format/date.json @@ -1,8 +1,38 @@ [ { "description": "validation of date strings", - "schema": {"format": "date"}, + "schema": { "format": "date" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date string", "data": "1963-06-19", diff --git a/tests/draft-future/optional/format/duration.json b/tests/draft-future/optional/format/duration.json index eb33dbbf..741348ae 100644 --- a/tests/draft-future/optional/format/duration.json +++ b/tests/draft-future/optional/format/duration.json @@ -1,8 +1,38 @@ [ { "description": "validation of duration strings", - "schema": {"format": "duration"}, + "schema": { "format": "duration" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid duration string", "data": "P4DT12H30M5S", diff --git a/tests/draft-future/optional/format/email.json b/tests/draft-future/optional/format/email.json index 02396d26..d6761a46 100644 --- a/tests/draft-future/optional/format/email.json +++ b/tests/draft-future/optional/format/email.json @@ -1,8 +1,38 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", diff --git a/tests/draft-future/optional/format/hostname.json b/tests/draft-future/optional/format/hostname.json index 476541a8..8a67fda8 100644 --- a/tests/draft-future/optional/format/hostname.json +++ b/tests/draft-future/optional/format/hostname.json @@ -1,8 +1,38 @@ [ { "description": "validation of host names", - "schema": {"format": "hostname"}, + "schema": { "format": "hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name", "data": "www.example.com", diff --git a/tests/draft-future/optional/format/idn-email.json b/tests/draft-future/optional/format/idn-email.json index 552d1067..6e213745 100644 --- a/tests/draft-future/optional/format/idn-email.json +++ b/tests/draft-future/optional/format/idn-email.json @@ -1,8 +1,38 @@ [ { "description": "validation of an internationalized e-mail addresses", - "schema": {"format": "idn-email"}, + "schema": { "format": "idn-email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid idn e-mail (example@example.test in Hangul)", "data": "실례@실례.테스트", diff --git a/tests/draft-future/optional/format/idn-hostname.json b/tests/draft-future/optional/format/idn-hostname.json index bbb257b9..6c8f86a3 100644 --- a/tests/draft-future/optional/format/idn-hostname.json +++ b/tests/draft-future/optional/format/idn-hostname.json @@ -3,6 +3,36 @@ "description": "validation of internationalized host names", "schema": { "format": "idn-hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name (example.test in Hangul)", "data": "실례.테스트", diff --git a/tests/draft-future/optional/format/ipv4.json b/tests/draft-future/optional/format/ipv4.json index 4d109277..6b166c70 100644 --- a/tests/draft-future/optional/format/ipv4.json +++ b/tests/draft-future/optional/format/ipv4.json @@ -1,8 +1,38 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, + "schema": { "format": "ipv4" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IP address", "data": "192.168.0.1", diff --git a/tests/draft-future/optional/format/ipv6.json b/tests/draft-future/optional/format/ipv6.json index cf629c60..caad69b1 100644 --- a/tests/draft-future/optional/format/ipv6.json +++ b/tests/draft-future/optional/format/ipv6.json @@ -1,8 +1,38 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IPv6 address", "data": "::1", diff --git a/tests/draft-future/optional/format/iri-reference.json b/tests/draft-future/optional/format/iri-reference.json index 1fd779c2..c6b4c22a 100644 --- a/tests/draft-future/optional/format/iri-reference.json +++ b/tests/draft-future/optional/format/iri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRI References", - "schema": {"format": "iri-reference"}, + "schema": { "format": "iri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft-future/optional/format/iri.json b/tests/draft-future/optional/format/iri.json index 1414f2e6..a0d12aed 100644 --- a/tests/draft-future/optional/format/iri.json +++ b/tests/draft-future/optional/format/iri.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRIs", - "schema": {"format": "iri"}, + "schema": { "format": "iri" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI with anchor tag", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft-future/optional/format/json-pointer.json b/tests/draft-future/optional/format/json-pointer.json index 65c2f064..a0346b57 100644 --- a/tests/draft-future/optional/format/json-pointer.json +++ b/tests/draft-future/optional/format/json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, + "schema": { "format": "json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid JSON-pointer", "data": "/foo/bar~0/baz~1/%a", diff --git a/tests/draft-future/optional/format/regex.json b/tests/draft-future/optional/format/regex.json index d99d021e..34491770 100644 --- a/tests/draft-future/optional/format/regex.json +++ b/tests/draft-future/optional/format/regex.json @@ -1,8 +1,38 @@ [ { "description": "validation of regular expressions", - "schema": {"format": "regex"}, + "schema": { "format": "regex" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid regular expression", "data": "([abc])+\\s+$", diff --git a/tests/draft-future/optional/format/relative-json-pointer.json b/tests/draft-future/optional/format/relative-json-pointer.json index 22fb14e0..9309986f 100644 --- a/tests/draft-future/optional/format/relative-json-pointer.json +++ b/tests/draft-future/optional/format/relative-json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of Relative JSON Pointers (RJP)", - "schema": {"format": "relative-json-pointer"}, + "schema": { "format": "relative-json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid upwards RJP", "data": "1", diff --git a/tests/draft-future/optional/format/time.json b/tests/draft-future/optional/format/time.json index 0a8da0e9..5011d788 100644 --- a/tests/draft-future/optional/format/time.json +++ b/tests/draft-future/optional/format/time.json @@ -1,8 +1,38 @@ [ { "description": "validation of time strings", - "schema": {"format": "time"}, + "schema": { "format": "time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid time string", "data": "08:30:06Z", diff --git a/tests/draft-future/optional/format/uri-reference.json b/tests/draft-future/optional/format/uri-reference.json index e4c9eef6..7cdf228d 100644 --- a/tests/draft-future/optional/format/uri-reference.json +++ b/tests/draft-future/optional/format/uri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of URI References", - "schema": {"format": "uri-reference"}, + "schema": { "format": "uri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", diff --git a/tests/draft-future/optional/format/uri-template.json b/tests/draft-future/optional/format/uri-template.json index 33ab76ee..df355c55 100644 --- a/tests/draft-future/optional/format/uri-template.json +++ b/tests/draft-future/optional/format/uri-template.json @@ -1,8 +1,38 @@ [ { "description": "format: uri-template", - "schema": {"format": "uri-template"}, + "schema": { "format": "uri-template" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid uri-template", "data": "http://example.com/dictionary/{term:1}/{term}", diff --git a/tests/draft-future/optional/format/uri.json b/tests/draft-future/optional/format/uri.json index 58d30857..792d71a0 100644 --- a/tests/draft-future/optional/format/uri.json +++ b/tests/draft-future/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URL with anchor tag", diff --git a/tests/draft2019-09/optional/format/date-time.json b/tests/draft2019-09/optional/format/date-time.json index 5f911efe..119179ca 100644 --- a/tests/draft2019-09/optional/format/date-time.json +++ b/tests/draft2019-09/optional/format/date-time.json @@ -1,8 +1,38 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", @@ -33,6 +63,11 @@ "data": "1990-12-31T15:59:60-24:00", "valid": false }, + { + "description": "an invalid closing Z after time-zone offset", + "data": "1963-06-19T08:30:06.28123+01:00Z", + "valid": false + }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", diff --git a/tests/draft2019-09/optional/format/date.json b/tests/draft2019-09/optional/format/date.json index 6cc2feb8..b4f61eed 100644 --- a/tests/draft2019-09/optional/format/date.json +++ b/tests/draft2019-09/optional/format/date.json @@ -1,8 +1,38 @@ [ { "description": "validation of date strings", - "schema": {"format": "date"}, + "schema": { "format": "date" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date string", "data": "1963-06-19", diff --git a/tests/draft2019-09/optional/format/duration.json b/tests/draft2019-09/optional/format/duration.json index eb33dbbf..741348ae 100644 --- a/tests/draft2019-09/optional/format/duration.json +++ b/tests/draft2019-09/optional/format/duration.json @@ -1,8 +1,38 @@ [ { "description": "validation of duration strings", - "schema": {"format": "duration"}, + "schema": { "format": "duration" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid duration string", "data": "P4DT12H30M5S", diff --git a/tests/draft2019-09/optional/format/email.json b/tests/draft2019-09/optional/format/email.json index 02396d26..d6761a46 100644 --- a/tests/draft2019-09/optional/format/email.json +++ b/tests/draft2019-09/optional/format/email.json @@ -1,8 +1,38 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", diff --git a/tests/draft2019-09/optional/format/hostname.json b/tests/draft2019-09/optional/format/hostname.json index 476541a8..8a67fda8 100644 --- a/tests/draft2019-09/optional/format/hostname.json +++ b/tests/draft2019-09/optional/format/hostname.json @@ -1,8 +1,38 @@ [ { "description": "validation of host names", - "schema": {"format": "hostname"}, + "schema": { "format": "hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name", "data": "www.example.com", diff --git a/tests/draft2019-09/optional/format/idn-email.json b/tests/draft2019-09/optional/format/idn-email.json index 552d1067..6e213745 100644 --- a/tests/draft2019-09/optional/format/idn-email.json +++ b/tests/draft2019-09/optional/format/idn-email.json @@ -1,8 +1,38 @@ [ { "description": "validation of an internationalized e-mail addresses", - "schema": {"format": "idn-email"}, + "schema": { "format": "idn-email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid idn e-mail (example@example.test in Hangul)", "data": "실례@실례.테스트", diff --git a/tests/draft2019-09/optional/format/idn-hostname.json b/tests/draft2019-09/optional/format/idn-hostname.json index bbb257b9..6c8f86a3 100644 --- a/tests/draft2019-09/optional/format/idn-hostname.json +++ b/tests/draft2019-09/optional/format/idn-hostname.json @@ -3,6 +3,36 @@ "description": "validation of internationalized host names", "schema": { "format": "idn-hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name (example.test in Hangul)", "data": "실례.테스트", diff --git a/tests/draft2019-09/optional/format/ipv4.json b/tests/draft2019-09/optional/format/ipv4.json index 4d109277..6b166c70 100644 --- a/tests/draft2019-09/optional/format/ipv4.json +++ b/tests/draft2019-09/optional/format/ipv4.json @@ -1,8 +1,38 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, + "schema": { "format": "ipv4" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IP address", "data": "192.168.0.1", diff --git a/tests/draft2019-09/optional/format/ipv6.json b/tests/draft2019-09/optional/format/ipv6.json index cf629c60..caad69b1 100644 --- a/tests/draft2019-09/optional/format/ipv6.json +++ b/tests/draft2019-09/optional/format/ipv6.json @@ -1,8 +1,38 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IPv6 address", "data": "::1", diff --git a/tests/draft2019-09/optional/format/iri-reference.json b/tests/draft2019-09/optional/format/iri-reference.json index 1fd779c2..c6b4c22a 100644 --- a/tests/draft2019-09/optional/format/iri-reference.json +++ b/tests/draft2019-09/optional/format/iri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRI References", - "schema": {"format": "iri-reference"}, + "schema": { "format": "iri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft2019-09/optional/format/iri.json b/tests/draft2019-09/optional/format/iri.json index 1414f2e6..a0d12aed 100644 --- a/tests/draft2019-09/optional/format/iri.json +++ b/tests/draft2019-09/optional/format/iri.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRIs", - "schema": {"format": "iri"}, + "schema": { "format": "iri" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI with anchor tag", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft2019-09/optional/format/json-pointer.json b/tests/draft2019-09/optional/format/json-pointer.json index 65c2f064..a0346b57 100644 --- a/tests/draft2019-09/optional/format/json-pointer.json +++ b/tests/draft2019-09/optional/format/json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, + "schema": { "format": "json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid JSON-pointer", "data": "/foo/bar~0/baz~1/%a", diff --git a/tests/draft2019-09/optional/format/regex.json b/tests/draft2019-09/optional/format/regex.json index d99d021e..34491770 100644 --- a/tests/draft2019-09/optional/format/regex.json +++ b/tests/draft2019-09/optional/format/regex.json @@ -1,8 +1,38 @@ [ { "description": "validation of regular expressions", - "schema": {"format": "regex"}, + "schema": { "format": "regex" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid regular expression", "data": "([abc])+\\s+$", diff --git a/tests/draft2019-09/optional/format/relative-json-pointer.json b/tests/draft2019-09/optional/format/relative-json-pointer.json index 22fb14e0..9309986f 100644 --- a/tests/draft2019-09/optional/format/relative-json-pointer.json +++ b/tests/draft2019-09/optional/format/relative-json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of Relative JSON Pointers (RJP)", - "schema": {"format": "relative-json-pointer"}, + "schema": { "format": "relative-json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid upwards RJP", "data": "1", diff --git a/tests/draft2019-09/optional/format/time.json b/tests/draft2019-09/optional/format/time.json index 0a8da0e9..5011d788 100644 --- a/tests/draft2019-09/optional/format/time.json +++ b/tests/draft2019-09/optional/format/time.json @@ -1,8 +1,38 @@ [ { "description": "validation of time strings", - "schema": {"format": "time"}, + "schema": { "format": "time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid time string", "data": "08:30:06Z", diff --git a/tests/draft2019-09/optional/format/uri-reference.json b/tests/draft2019-09/optional/format/uri-reference.json index e4c9eef6..7cdf228d 100644 --- a/tests/draft2019-09/optional/format/uri-reference.json +++ b/tests/draft2019-09/optional/format/uri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of URI References", - "schema": {"format": "uri-reference"}, + "schema": { "format": "uri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", diff --git a/tests/draft2019-09/optional/format/uri-template.json b/tests/draft2019-09/optional/format/uri-template.json index 33ab76ee..df355c55 100644 --- a/tests/draft2019-09/optional/format/uri-template.json +++ b/tests/draft2019-09/optional/format/uri-template.json @@ -1,8 +1,38 @@ [ { "description": "format: uri-template", - "schema": {"format": "uri-template"}, + "schema": { "format": "uri-template" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid uri-template", "data": "http://example.com/dictionary/{term:1}/{term}", diff --git a/tests/draft2019-09/optional/format/uri.json b/tests/draft2019-09/optional/format/uri.json index 58d30857..792d71a0 100644 --- a/tests/draft2019-09/optional/format/uri.json +++ b/tests/draft2019-09/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URL with anchor tag", diff --git a/tests/draft2020-12/optional/format/date-time.json b/tests/draft2020-12/optional/format/date-time.json index 5f911efe..119179ca 100644 --- a/tests/draft2020-12/optional/format/date-time.json +++ b/tests/draft2020-12/optional/format/date-time.json @@ -1,8 +1,38 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", @@ -33,6 +63,11 @@ "data": "1990-12-31T15:59:60-24:00", "valid": false }, + { + "description": "an invalid closing Z after time-zone offset", + "data": "1963-06-19T08:30:06.28123+01:00Z", + "valid": false + }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", diff --git a/tests/draft2020-12/optional/format/date.json b/tests/draft2020-12/optional/format/date.json index 6cc2feb8..b4f61eed 100644 --- a/tests/draft2020-12/optional/format/date.json +++ b/tests/draft2020-12/optional/format/date.json @@ -1,8 +1,38 @@ [ { "description": "validation of date strings", - "schema": {"format": "date"}, + "schema": { "format": "date" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date string", "data": "1963-06-19", diff --git a/tests/draft2020-12/optional/format/duration.json b/tests/draft2020-12/optional/format/duration.json index eb33dbbf..741348ae 100644 --- a/tests/draft2020-12/optional/format/duration.json +++ b/tests/draft2020-12/optional/format/duration.json @@ -1,8 +1,38 @@ [ { "description": "validation of duration strings", - "schema": {"format": "duration"}, + "schema": { "format": "duration" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid duration string", "data": "P4DT12H30M5S", diff --git a/tests/draft2020-12/optional/format/email.json b/tests/draft2020-12/optional/format/email.json index 02396d26..d6761a46 100644 --- a/tests/draft2020-12/optional/format/email.json +++ b/tests/draft2020-12/optional/format/email.json @@ -1,8 +1,38 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", diff --git a/tests/draft2020-12/optional/format/hostname.json b/tests/draft2020-12/optional/format/hostname.json index 476541a8..8a67fda8 100644 --- a/tests/draft2020-12/optional/format/hostname.json +++ b/tests/draft2020-12/optional/format/hostname.json @@ -1,8 +1,38 @@ [ { "description": "validation of host names", - "schema": {"format": "hostname"}, + "schema": { "format": "hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name", "data": "www.example.com", diff --git a/tests/draft2020-12/optional/format/idn-email.json b/tests/draft2020-12/optional/format/idn-email.json index 552d1067..6e213745 100644 --- a/tests/draft2020-12/optional/format/idn-email.json +++ b/tests/draft2020-12/optional/format/idn-email.json @@ -1,8 +1,38 @@ [ { "description": "validation of an internationalized e-mail addresses", - "schema": {"format": "idn-email"}, + "schema": { "format": "idn-email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid idn e-mail (example@example.test in Hangul)", "data": "실례@실례.테스트", diff --git a/tests/draft2020-12/optional/format/idn-hostname.json b/tests/draft2020-12/optional/format/idn-hostname.json index bbb257b9..6c8f86a3 100644 --- a/tests/draft2020-12/optional/format/idn-hostname.json +++ b/tests/draft2020-12/optional/format/idn-hostname.json @@ -3,6 +3,36 @@ "description": "validation of internationalized host names", "schema": { "format": "idn-hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name (example.test in Hangul)", "data": "실례.테스트", diff --git a/tests/draft2020-12/optional/format/ipv4.json b/tests/draft2020-12/optional/format/ipv4.json index 4d109277..6b166c70 100644 --- a/tests/draft2020-12/optional/format/ipv4.json +++ b/tests/draft2020-12/optional/format/ipv4.json @@ -1,8 +1,38 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, + "schema": { "format": "ipv4" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IP address", "data": "192.168.0.1", diff --git a/tests/draft2020-12/optional/format/ipv6.json b/tests/draft2020-12/optional/format/ipv6.json index cf629c60..caad69b1 100644 --- a/tests/draft2020-12/optional/format/ipv6.json +++ b/tests/draft2020-12/optional/format/ipv6.json @@ -1,8 +1,38 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IPv6 address", "data": "::1", diff --git a/tests/draft2020-12/optional/format/iri-reference.json b/tests/draft2020-12/optional/format/iri-reference.json index 1fd779c2..c6b4c22a 100644 --- a/tests/draft2020-12/optional/format/iri-reference.json +++ b/tests/draft2020-12/optional/format/iri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRI References", - "schema": {"format": "iri-reference"}, + "schema": { "format": "iri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft2020-12/optional/format/iri.json b/tests/draft2020-12/optional/format/iri.json index 1414f2e6..a0d12aed 100644 --- a/tests/draft2020-12/optional/format/iri.json +++ b/tests/draft2020-12/optional/format/iri.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRIs", - "schema": {"format": "iri"}, + "schema": { "format": "iri" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI with anchor tag", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft2020-12/optional/format/json-pointer.json b/tests/draft2020-12/optional/format/json-pointer.json index 65c2f064..a0346b57 100644 --- a/tests/draft2020-12/optional/format/json-pointer.json +++ b/tests/draft2020-12/optional/format/json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, + "schema": { "format": "json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid JSON-pointer", "data": "/foo/bar~0/baz~1/%a", diff --git a/tests/draft2020-12/optional/format/regex.json b/tests/draft2020-12/optional/format/regex.json index d99d021e..34491770 100644 --- a/tests/draft2020-12/optional/format/regex.json +++ b/tests/draft2020-12/optional/format/regex.json @@ -1,8 +1,38 @@ [ { "description": "validation of regular expressions", - "schema": {"format": "regex"}, + "schema": { "format": "regex" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid regular expression", "data": "([abc])+\\s+$", diff --git a/tests/draft2020-12/optional/format/relative-json-pointer.json b/tests/draft2020-12/optional/format/relative-json-pointer.json index 22fb14e0..9309986f 100644 --- a/tests/draft2020-12/optional/format/relative-json-pointer.json +++ b/tests/draft2020-12/optional/format/relative-json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of Relative JSON Pointers (RJP)", - "schema": {"format": "relative-json-pointer"}, + "schema": { "format": "relative-json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid upwards RJP", "data": "1", diff --git a/tests/draft2020-12/optional/format/time.json b/tests/draft2020-12/optional/format/time.json index 0a8da0e9..5011d788 100644 --- a/tests/draft2020-12/optional/format/time.json +++ b/tests/draft2020-12/optional/format/time.json @@ -1,8 +1,38 @@ [ { "description": "validation of time strings", - "schema": {"format": "time"}, + "schema": { "format": "time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid time string", "data": "08:30:06Z", diff --git a/tests/draft2020-12/optional/format/uri-reference.json b/tests/draft2020-12/optional/format/uri-reference.json index e4c9eef6..7cdf228d 100644 --- a/tests/draft2020-12/optional/format/uri-reference.json +++ b/tests/draft2020-12/optional/format/uri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of URI References", - "schema": {"format": "uri-reference"}, + "schema": { "format": "uri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", diff --git a/tests/draft2020-12/optional/format/uri-template.json b/tests/draft2020-12/optional/format/uri-template.json index 33ab76ee..df355c55 100644 --- a/tests/draft2020-12/optional/format/uri-template.json +++ b/tests/draft2020-12/optional/format/uri-template.json @@ -1,8 +1,38 @@ [ { "description": "format: uri-template", - "schema": {"format": "uri-template"}, + "schema": { "format": "uri-template" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid uri-template", "data": "http://example.com/dictionary/{term:1}/{term}", diff --git a/tests/draft2020-12/optional/format/uri.json b/tests/draft2020-12/optional/format/uri.json index 58d30857..792d71a0 100644 --- a/tests/draft2020-12/optional/format/uri.json +++ b/tests/draft2020-12/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URL with anchor tag", diff --git a/tests/draft3/optional/format/color.json b/tests/draft3/optional/format/color.json index e80cb69e..0c0b5348 100644 --- a/tests/draft3/optional/format/color.json +++ b/tests/draft3/optional/format/color.json @@ -1,7 +1,7 @@ [ { "description": "validation of CSS colors", - "schema": {"format": "color"}, + "schema": { "format": "color" }, "tests": [ { "description": "a valid CSS color name", diff --git a/tests/draft3/optional/format/date-time.json b/tests/draft3/optional/format/date-time.json index 58261fad..1f1e6fb3 100644 --- a/tests/draft3/optional/format/date-time.json +++ b/tests/draft3/optional/format/date-time.json @@ -1,7 +1,7 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ { "description": "a valid date-time string", diff --git a/tests/draft3/optional/format/date.json b/tests/draft3/optional/format/date.json index 554fe548..796bc463 100644 --- a/tests/draft3/optional/format/date.json +++ b/tests/draft3/optional/format/date.json @@ -1,7 +1,7 @@ [ { "description": "validation of date strings", - "schema": {"format": "date"}, + "schema": { "format": "date" }, "tests": [ { "description": "a valid date string", diff --git a/tests/draft3/optional/format/email.json b/tests/draft3/optional/format/email.json index 02396d26..059615ad 100644 --- a/tests/draft3/optional/format/email.json +++ b/tests/draft3/optional/format/email.json @@ -1,7 +1,7 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ { "description": "a valid e-mail address", diff --git a/tests/draft3/optional/format/host-name.json b/tests/draft3/optional/format/host-name.json index 8f6e28a0..d418f376 100644 --- a/tests/draft3/optional/format/host-name.json +++ b/tests/draft3/optional/format/host-name.json @@ -1,7 +1,7 @@ [ { "description": "validation of host names", - "schema": {"format": "host-name"}, + "schema": { "format": "host-name" }, "tests": [ { "description": "a valid host name", diff --git a/tests/draft3/optional/format/ip-address.json b/tests/draft3/optional/format/ip-address.json index c868bfb5..91cac9fa 100644 --- a/tests/draft3/optional/format/ip-address.json +++ b/tests/draft3/optional/format/ip-address.json @@ -1,7 +1,7 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ip-address"}, + "schema": { "format": "ip-address" }, "tests": [ { "description": "a valid IP address", diff --git a/tests/draft3/optional/format/ipv6.json b/tests/draft3/optional/format/ipv6.json index 131edb82..c3ef3790 100644 --- a/tests/draft3/optional/format/ipv6.json +++ b/tests/draft3/optional/format/ipv6.json @@ -1,7 +1,7 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ { "description": "a valid IPv6 address", diff --git a/tests/draft3/optional/format/regex.json b/tests/draft3/optional/format/regex.json index d99d021e..8a377638 100644 --- a/tests/draft3/optional/format/regex.json +++ b/tests/draft3/optional/format/regex.json @@ -1,7 +1,7 @@ [ { "description": "validation of regular expressions", - "schema": {"format": "regex"}, + "schema": { "format": "regex" }, "tests": [ { "description": "a valid regular expression", diff --git a/tests/draft3/optional/format/time.json b/tests/draft3/optional/format/time.json index e97160de..36c823e6 100644 --- a/tests/draft3/optional/format/time.json +++ b/tests/draft3/optional/format/time.json @@ -1,7 +1,7 @@ [ { "description": "validation of time strings", - "schema": {"format": "time"}, + "schema": { "format": "time" }, "tests": [ { "description": "a valid time string", diff --git a/tests/draft3/optional/format/uri.json b/tests/draft3/optional/format/uri.json index 9c4de354..f024b624 100644 --- a/tests/draft3/optional/format/uri.json +++ b/tests/draft3/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URI", diff --git a/tests/draft4/optional/format/date-time.json b/tests/draft4/optional/format/date-time.json index 5f911efe..119179ca 100644 --- a/tests/draft4/optional/format/date-time.json +++ b/tests/draft4/optional/format/date-time.json @@ -1,8 +1,38 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", @@ -33,6 +63,11 @@ "data": "1990-12-31T15:59:60-24:00", "valid": false }, + { + "description": "an invalid closing Z after time-zone offset", + "data": "1963-06-19T08:30:06.28123+01:00Z", + "valid": false + }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", diff --git a/tests/draft4/optional/format/email.json b/tests/draft4/optional/format/email.json index 02396d26..d6761a46 100644 --- a/tests/draft4/optional/format/email.json +++ b/tests/draft4/optional/format/email.json @@ -1,8 +1,38 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", diff --git a/tests/draft4/optional/format/hostname.json b/tests/draft4/optional/format/hostname.json index e913abad..8a67fda8 100644 --- a/tests/draft4/optional/format/hostname.json +++ b/tests/draft4/optional/format/hostname.json @@ -1,13 +1,48 @@ [ { "description": "validation of host names", - "schema": {"format": "hostname"}, + "schema": { "format": "hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name", "data": "www.example.com", "valid": true }, + { + "description": "a valid punycoded IDN hostname", + "data": "xn--4gbwdl.xn--wgbh1c", + "valid": true + }, { "description": "a host name starting with an illegal character", "data": "-a-host-name-that-starts-with--", @@ -61,4 +96,3 @@ ] } ] - diff --git a/tests/draft4/optional/format/ipv4.json b/tests/draft4/optional/format/ipv4.json index 4d109277..6b166c70 100644 --- a/tests/draft4/optional/format/ipv4.json +++ b/tests/draft4/optional/format/ipv4.json @@ -1,8 +1,38 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, + "schema": { "format": "ipv4" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IP address", "data": "192.168.0.1", diff --git a/tests/draft4/optional/format/ipv6.json b/tests/draft4/optional/format/ipv6.json index cf629c60..caad69b1 100644 --- a/tests/draft4/optional/format/ipv6.json +++ b/tests/draft4/optional/format/ipv6.json @@ -1,8 +1,38 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IPv6 address", "data": "::1", diff --git a/tests/draft4/optional/format/uri.json b/tests/draft4/optional/format/uri.json index 58d30857..792d71a0 100644 --- a/tests/draft4/optional/format/uri.json +++ b/tests/draft4/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URL with anchor tag", diff --git a/tests/draft6/optional/format/date-time.json b/tests/draft6/optional/format/date-time.json index 2dd214ab..119179ca 100644 --- a/tests/draft6/optional/format/date-time.json +++ b/tests/draft6/optional/format/date-time.json @@ -1,8 +1,38 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", diff --git a/tests/draft6/optional/format/email.json b/tests/draft6/optional/format/email.json index 02396d26..d6761a46 100644 --- a/tests/draft6/optional/format/email.json +++ b/tests/draft6/optional/format/email.json @@ -1,8 +1,38 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", diff --git a/tests/draft6/optional/format/hostname.json b/tests/draft6/optional/format/hostname.json index d7654e01..8a67fda8 100644 --- a/tests/draft6/optional/format/hostname.json +++ b/tests/draft6/optional/format/hostname.json @@ -1,13 +1,48 @@ [ { "description": "validation of host names", - "schema": {"format": "hostname"}, + "schema": { "format": "hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name", "data": "www.example.com", "valid": true }, + { + "description": "a valid punycoded IDN hostname", + "data": "xn--4gbwdl.xn--wgbh1c", + "valid": true + }, { "description": "a host name starting with an illegal character", "data": "-a-host-name-that-starts-with--", diff --git a/tests/draft6/optional/format/ipv4.json b/tests/draft6/optional/format/ipv4.json index 4d109277..6b166c70 100644 --- a/tests/draft6/optional/format/ipv4.json +++ b/tests/draft6/optional/format/ipv4.json @@ -1,8 +1,38 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, + "schema": { "format": "ipv4" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IP address", "data": "192.168.0.1", diff --git a/tests/draft6/optional/format/ipv6.json b/tests/draft6/optional/format/ipv6.json index cf629c60..caad69b1 100644 --- a/tests/draft6/optional/format/ipv6.json +++ b/tests/draft6/optional/format/ipv6.json @@ -1,8 +1,38 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IPv6 address", "data": "::1", diff --git a/tests/draft6/optional/format/json-pointer.json b/tests/draft6/optional/format/json-pointer.json index 65c2f064..a0346b57 100644 --- a/tests/draft6/optional/format/json-pointer.json +++ b/tests/draft6/optional/format/json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, + "schema": { "format": "json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid JSON-pointer", "data": "/foo/bar~0/baz~1/%a", diff --git a/tests/draft6/optional/format/uri-reference.json b/tests/draft6/optional/format/uri-reference.json index e4c9eef6..7cdf228d 100644 --- a/tests/draft6/optional/format/uri-reference.json +++ b/tests/draft6/optional/format/uri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of URI References", - "schema": {"format": "uri-reference"}, + "schema": { "format": "uri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", diff --git a/tests/draft6/optional/format/uri-template.json b/tests/draft6/optional/format/uri-template.json index 33ab76ee..df355c55 100644 --- a/tests/draft6/optional/format/uri-template.json +++ b/tests/draft6/optional/format/uri-template.json @@ -1,8 +1,38 @@ [ { "description": "format: uri-template", - "schema": {"format": "uri-template"}, + "schema": { "format": "uri-template" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid uri-template", "data": "http://example.com/dictionary/{term:1}/{term}", diff --git a/tests/draft6/optional/format/uri.json b/tests/draft6/optional/format/uri.json index 58d30857..792d71a0 100644 --- a/tests/draft6/optional/format/uri.json +++ b/tests/draft6/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URL with anchor tag", diff --git a/tests/draft7/optional/format/date-time.json b/tests/draft7/optional/format/date-time.json index 5f911efe..119179ca 100644 --- a/tests/draft7/optional/format/date-time.json +++ b/tests/draft7/optional/format/date-time.json @@ -1,8 +1,38 @@ [ { "description": "validation of date-time strings", - "schema": {"format": "date-time"}, + "schema": { "format": "date-time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", @@ -33,6 +63,11 @@ "data": "1990-12-31T15:59:60-24:00", "valid": false }, + { + "description": "an invalid closing Z after time-zone offset", + "data": "1963-06-19T08:30:06.28123+01:00Z", + "valid": false + }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", diff --git a/tests/draft7/optional/format/date.json b/tests/draft7/optional/format/date.json index 6cc2feb8..b4f61eed 100644 --- a/tests/draft7/optional/format/date.json +++ b/tests/draft7/optional/format/date.json @@ -1,8 +1,38 @@ [ { "description": "validation of date strings", - "schema": {"format": "date"}, + "schema": { "format": "date" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid date string", "data": "1963-06-19", diff --git a/tests/draft7/optional/format/email.json b/tests/draft7/optional/format/email.json index 02396d26..d6761a46 100644 --- a/tests/draft7/optional/format/email.json +++ b/tests/draft7/optional/format/email.json @@ -1,8 +1,38 @@ [ { "description": "validation of e-mail addresses", - "schema": {"format": "email"}, + "schema": { "format": "email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid e-mail address", "data": "joe.bloggs@example.com", diff --git a/tests/draft7/optional/format/hostname.json b/tests/draft7/optional/format/hostname.json index 476541a8..8a67fda8 100644 --- a/tests/draft7/optional/format/hostname.json +++ b/tests/draft7/optional/format/hostname.json @@ -1,8 +1,38 @@ [ { "description": "validation of host names", - "schema": {"format": "hostname"}, + "schema": { "format": "hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name", "data": "www.example.com", diff --git a/tests/draft7/optional/format/idn-email.json b/tests/draft7/optional/format/idn-email.json index 552d1067..6e213745 100644 --- a/tests/draft7/optional/format/idn-email.json +++ b/tests/draft7/optional/format/idn-email.json @@ -1,8 +1,38 @@ [ { "description": "validation of an internationalized e-mail addresses", - "schema": {"format": "idn-email"}, + "schema": { "format": "idn-email" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid idn e-mail (example@example.test in Hangul)", "data": "실례@실례.테스트", diff --git a/tests/draft7/optional/format/idn-hostname.json b/tests/draft7/optional/format/idn-hostname.json index 7f10bd83..6c8f86a3 100644 --- a/tests/draft7/optional/format/idn-hostname.json +++ b/tests/draft7/optional/format/idn-hostname.json @@ -1,8 +1,38 @@ [ { "description": "validation of internationalized host names", - "schema": {"format": "idn-hostname"}, + "schema": { "format": "idn-hostname" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid host name (example.test in Hangul)", "data": "실례.테스트", @@ -91,7 +121,7 @@ }, { "description": "Exceptions that are PVALID, right-to-left chars", - "comment": "https://tools.ietf.org/html/rfc/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", "data": "\u06fd\u06fe", "valid": true }, diff --git a/tests/draft7/optional/format/ipv4.json b/tests/draft7/optional/format/ipv4.json index 4d109277..6b166c70 100644 --- a/tests/draft7/optional/format/ipv4.json +++ b/tests/draft7/optional/format/ipv4.json @@ -1,8 +1,38 @@ [ { "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, + "schema": { "format": "ipv4" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IP address", "data": "192.168.0.1", diff --git a/tests/draft7/optional/format/ipv6.json b/tests/draft7/optional/format/ipv6.json index cf629c60..caad69b1 100644 --- a/tests/draft7/optional/format/ipv6.json +++ b/tests/draft7/optional/format/ipv6.json @@ -1,8 +1,38 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IPv6 address", "data": "::1", diff --git a/tests/draft7/optional/format/iri-reference.json b/tests/draft7/optional/format/iri-reference.json index 1fd779c2..c6b4c22a 100644 --- a/tests/draft7/optional/format/iri-reference.json +++ b/tests/draft7/optional/format/iri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRI References", - "schema": {"format": "iri-reference"}, + "schema": { "format": "iri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft7/optional/format/iri.json b/tests/draft7/optional/format/iri.json index 1414f2e6..a0d12aed 100644 --- a/tests/draft7/optional/format/iri.json +++ b/tests/draft7/optional/format/iri.json @@ -1,8 +1,38 @@ [ { "description": "validation of IRIs", - "schema": {"format": "iri"}, + "schema": { "format": "iri" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid IRI with anchor tag", "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", diff --git a/tests/draft7/optional/format/json-pointer.json b/tests/draft7/optional/format/json-pointer.json index 65c2f064..a0346b57 100644 --- a/tests/draft7/optional/format/json-pointer.json +++ b/tests/draft7/optional/format/json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, + "schema": { "format": "json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid JSON-pointer", "data": "/foo/bar~0/baz~1/%a", diff --git a/tests/draft7/optional/format/regex.json b/tests/draft7/optional/format/regex.json index d99d021e..34491770 100644 --- a/tests/draft7/optional/format/regex.json +++ b/tests/draft7/optional/format/regex.json @@ -1,8 +1,38 @@ [ { "description": "validation of regular expressions", - "schema": {"format": "regex"}, + "schema": { "format": "regex" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid regular expression", "data": "([abc])+\\s+$", diff --git a/tests/draft7/optional/format/relative-json-pointer.json b/tests/draft7/optional/format/relative-json-pointer.json index 22fb14e0..9309986f 100644 --- a/tests/draft7/optional/format/relative-json-pointer.json +++ b/tests/draft7/optional/format/relative-json-pointer.json @@ -1,8 +1,38 @@ [ { "description": "validation of Relative JSON Pointers (RJP)", - "schema": {"format": "relative-json-pointer"}, + "schema": { "format": "relative-json-pointer" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid upwards RJP", "data": "1", diff --git a/tests/draft7/optional/format/time.json b/tests/draft7/optional/format/time.json index 0a8da0e9..5011d788 100644 --- a/tests/draft7/optional/format/time.json +++ b/tests/draft7/optional/format/time.json @@ -1,8 +1,38 @@ [ { "description": "validation of time strings", - "schema": {"format": "time"}, + "schema": { "format": "time" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid time string", "data": "08:30:06Z", diff --git a/tests/draft7/optional/format/uri-reference.json b/tests/draft7/optional/format/uri-reference.json index e4c9eef6..7cdf228d 100644 --- a/tests/draft7/optional/format/uri-reference.json +++ b/tests/draft7/optional/format/uri-reference.json @@ -1,8 +1,38 @@ [ { "description": "validation of URI References", - "schema": {"format": "uri-reference"}, + "schema": { "format": "uri-reference" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid URI", "data": "http://foo.bar/?baz=qux#quux", diff --git a/tests/draft7/optional/format/uri-template.json b/tests/draft7/optional/format/uri-template.json index 33ab76ee..df355c55 100644 --- a/tests/draft7/optional/format/uri-template.json +++ b/tests/draft7/optional/format/uri-template.json @@ -1,8 +1,38 @@ [ { "description": "format: uri-template", - "schema": {"format": "uri-template"}, + "schema": { "format": "uri-template" }, "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, { "description": "a valid uri-template", "data": "http://example.com/dictionary/{term:1}/{term}", diff --git a/tests/draft7/optional/format/uri.json b/tests/draft7/optional/format/uri.json index 58d30857..792d71a0 100644 --- a/tests/draft7/optional/format/uri.json +++ b/tests/draft7/optional/format/uri.json @@ -1,7 +1,7 @@ [ { "description": "validation of URIs", - "schema": {"format": "uri"}, + "schema": { "format": "uri" }, "tests": [ { "description": "a valid URL with anchor tag",