summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-10-19 18:34:35 -0400
committerJulian Berman <Julian@GrayVines.com>2021-10-19 18:34:35 -0400
commit4ecbea58e0828696f7714abba624e2160518fddd (patch)
tree395a5d1b72c0baa3323ef91446d4d19cf0d6ea13
parentcf886386cc0996df6743b425f74675a6d8a1a9ca (diff)
downloadjsonschema-4ecbea58e0828696f7714abba624e2160518fddd.tar.gz
Squashed 'json/' changes from 54440eab4..ba3a90534
ba3a90534 Merge pull request #523 from olegshtch/extendible-schema-test-suite 458e7ac1e Add test suite to test dynamic reference and anchor link and their independency of order fe405a119 draft/future -> draft/next in $refs also 3d9d35a2a Merge pull request #522 from json-schema-org/ether/draft-next 11b5076f0 rename draft-future to draft-next 0245dcc94 Merge pull request #521 from olegshtch/add-recursive-ref-test-suite e9fb9cf45 Merge pull request #517 from ChALkeR/chalker/date-time-leap f1b230c69 Add test from Appendix C. Example of recursive schema extension of the draft. bb2e37317 Test date-time with leap second on a wrong hour/minute 8b797cfe6 Merge pull request #520 from json-schema-org/ether/custom-dialect 5d23f3112 Add tests for invalid date-time past leap second 63f8e93c1 Improve leap seconds test in optional/format/date-time 3d00f593d test the use of the $vocabulary keyword in a custom metaschema git-subtree-dir: json git-subtree-split: ba3a9053400dd6237aef9cc63601758b1d266818
-rw-r--r--remotes/draft2019-09/metaschema-no-validation.json11
-rw-r--r--remotes/draft2020-12/metaschema-no-validation.json11
-rw-r--r--remotes/extendible-dynamic-ref.json20
-rw-r--r--remotes/tree.json16
-rw-r--r--tests/draft-next/additionalProperties.json (renamed from tests/draft-future/additionalProperties.json)0
-rw-r--r--tests/draft-next/allOf.json (renamed from tests/draft-future/allOf.json)0
-rw-r--r--tests/draft-next/anchor.json (renamed from tests/draft-future/anchor.json)0
-rw-r--r--tests/draft-next/anyOf.json (renamed from tests/draft-future/anyOf.json)0
-rw-r--r--tests/draft-next/boolean_schema.json (renamed from tests/draft-future/boolean_schema.json)0
-rw-r--r--tests/draft-next/const.json (renamed from tests/draft-future/const.json)0
-rw-r--r--tests/draft-next/contains.json (renamed from tests/draft-future/contains.json)0
-rw-r--r--tests/draft-next/content.json (renamed from tests/draft-future/content.json)0
-rw-r--r--tests/draft-next/default.json (renamed from tests/draft-future/default.json)0
-rw-r--r--tests/draft-next/defs.json (renamed from tests/draft-future/defs.json)0
-rw-r--r--tests/draft-next/dependentRequired.json (renamed from tests/draft-future/dependentRequired.json)0
-rw-r--r--tests/draft-next/dependentSchemas.json (renamed from tests/draft-future/dependentSchemas.json)0
-rw-r--r--tests/draft-next/dynamicRef.json (renamed from tests/draft-future/dynamicRef.json)174
-rw-r--r--tests/draft-next/enum.json (renamed from tests/draft-future/enum.json)0
-rw-r--r--tests/draft-next/exclusiveMaximum.json (renamed from tests/draft-future/exclusiveMaximum.json)0
-rw-r--r--tests/draft-next/exclusiveMinimum.json (renamed from tests/draft-future/exclusiveMinimum.json)0
-rw-r--r--tests/draft-next/format.json (renamed from tests/draft-future/format.json)0
-rw-r--r--tests/draft-next/id.json (renamed from tests/draft-future/id.json)6
-rw-r--r--tests/draft-next/if-then-else.json (renamed from tests/draft-future/if-then-else.json)0
-rw-r--r--tests/draft-next/infinite-loop-detection.json (renamed from tests/draft-future/infinite-loop-detection.json)0
-rw-r--r--tests/draft-next/items.json (renamed from tests/draft-future/items.json)0
-rw-r--r--tests/draft-next/maxContains.json (renamed from tests/draft-future/maxContains.json)0
-rw-r--r--tests/draft-next/maxItems.json (renamed from tests/draft-future/maxItems.json)0
-rw-r--r--tests/draft-next/maxLength.json (renamed from tests/draft-future/maxLength.json)0
-rw-r--r--tests/draft-next/maxProperties.json (renamed from tests/draft-future/maxProperties.json)0
-rw-r--r--tests/draft-next/maximum.json (renamed from tests/draft-future/maximum.json)0
-rw-r--r--tests/draft-next/minContains.json (renamed from tests/draft-future/minContains.json)0
-rw-r--r--tests/draft-next/minItems.json (renamed from tests/draft-future/minItems.json)0
-rw-r--r--tests/draft-next/minLength.json (renamed from tests/draft-future/minLength.json)0
-rw-r--r--tests/draft-next/minProperties.json (renamed from tests/draft-future/minProperties.json)0
-rw-r--r--tests/draft-next/minimum.json (renamed from tests/draft-future/minimum.json)0
-rw-r--r--tests/draft-next/multipleOf.json (renamed from tests/draft-future/multipleOf.json)0
-rw-r--r--tests/draft-next/not.json (renamed from tests/draft-future/not.json)0
-rw-r--r--tests/draft-next/oneOf.json (renamed from tests/draft-future/oneOf.json)0
-rw-r--r--tests/draft-next/optional/bignum.json (renamed from tests/draft-future/optional/bignum.json)0
-rw-r--r--tests/draft-next/optional/ecmascript-regex.json (renamed from tests/draft-future/optional/ecmascript-regex.json)0
-rw-r--r--tests/draft-next/optional/float-overflow.json (renamed from tests/draft-future/optional/float-overflow.json)0
-rw-r--r--tests/draft-next/optional/format-assertion.json (renamed from tests/draft-future/optional/format-assertion.json)0
-rw-r--r--tests/draft-next/optional/format/date-time.json (renamed from tests/draft-future/optional/format/date-time.json)31
-rw-r--r--tests/draft-next/optional/format/date.json (renamed from tests/draft-future/optional/format/date.json)0
-rw-r--r--tests/draft-next/optional/format/duration.json (renamed from tests/draft-future/optional/format/duration.json)0
-rw-r--r--tests/draft-next/optional/format/email.json (renamed from tests/draft-future/optional/format/email.json)0
-rw-r--r--tests/draft-next/optional/format/hostname.json (renamed from tests/draft-future/optional/format/hostname.json)0
-rw-r--r--tests/draft-next/optional/format/idn-email.json (renamed from tests/draft-future/optional/format/idn-email.json)0
-rw-r--r--tests/draft-next/optional/format/idn-hostname.json (renamed from tests/draft-future/optional/format/idn-hostname.json)0
-rw-r--r--tests/draft-next/optional/format/ipv4.json (renamed from tests/draft-future/optional/format/ipv4.json)0
-rw-r--r--tests/draft-next/optional/format/ipv6.json (renamed from tests/draft-future/optional/format/ipv6.json)0
-rw-r--r--tests/draft-next/optional/format/iri-reference.json (renamed from tests/draft-future/optional/format/iri-reference.json)0
-rw-r--r--tests/draft-next/optional/format/iri.json (renamed from tests/draft-future/optional/format/iri.json)0
-rw-r--r--tests/draft-next/optional/format/json-pointer.json (renamed from tests/draft-future/optional/format/json-pointer.json)0
-rw-r--r--tests/draft-next/optional/format/regex.json (renamed from tests/draft-future/optional/format/regex.json)0
-rw-r--r--tests/draft-next/optional/format/relative-json-pointer.json (renamed from tests/draft-future/optional/format/relative-json-pointer.json)0
-rw-r--r--tests/draft-next/optional/format/time.json (renamed from tests/draft-future/optional/format/time.json)0
-rw-r--r--tests/draft-next/optional/format/uri-reference.json (renamed from tests/draft-future/optional/format/uri-reference.json)0
-rw-r--r--tests/draft-next/optional/format/uri-template.json (renamed from tests/draft-future/optional/format/uri-template.json)0
-rw-r--r--tests/draft-next/optional/format/uri.json (renamed from tests/draft-future/optional/format/uri.json)0
-rw-r--r--tests/draft-next/optional/format/uuid.json (renamed from tests/draft-future/optional/format/uuid.json)0
-rw-r--r--tests/draft-next/optional/non-bmp-regex.json (renamed from tests/draft-future/optional/non-bmp-regex.json)0
-rw-r--r--tests/draft-next/optional/refOfUnknownKeyword.json (renamed from tests/draft-future/optional/refOfUnknownKeyword.json)0
-rw-r--r--tests/draft-next/pattern.json (renamed from tests/draft-future/pattern.json)0
-rw-r--r--tests/draft-next/patternProperties.json (renamed from tests/draft-future/patternProperties.json)0
-rw-r--r--tests/draft-next/prefixItems.json (renamed from tests/draft-future/prefixItems.json)0
-rw-r--r--tests/draft-next/properties.json (renamed from tests/draft-future/properties.json)0
-rw-r--r--tests/draft-next/propertyNames.json (renamed from tests/draft-future/propertyNames.json)0
-rw-r--r--tests/draft-next/ref.json (renamed from tests/draft-future/ref.json)2
-rw-r--r--tests/draft-next/refRemote.json (renamed from tests/draft-future/refRemote.json)0
-rw-r--r--tests/draft-next/required.json (renamed from tests/draft-future/required.json)0
-rw-r--r--tests/draft-next/type.json (renamed from tests/draft-future/type.json)0
-rw-r--r--tests/draft-next/unevaluatedItems.json (renamed from tests/draft-future/unevaluatedItems.json)0
-rw-r--r--tests/draft-next/unevaluatedProperties.json (renamed from tests/draft-future/unevaluatedProperties.json)0
-rw-r--r--tests/draft-next/uniqueItems.json (renamed from tests/draft-future/uniqueItems.json)0
-rw-r--r--tests/draft-next/unknownKeyword.json (renamed from tests/draft-future/unknownKeyword.json)0
-rw-r--r--tests/draft-next/vocabulary.json34
-rw-r--r--tests/draft2019-09/optional/format/date-time.json31
-rw-r--r--tests/draft2019-09/vocabulary.json34
-rw-r--r--tests/draft2020-12/dynamicRef.json174
-rw-r--r--tests/draft2020-12/optional/format/date-time.json31
-rw-r--r--tests/draft2020-12/vocabulary.json34
-rw-r--r--tests/draft4/optional/format/date-time.json31
-rw-r--r--tests/draft6/optional/format/date-time.json31
-rw-r--r--tests/draft7/optional/format/date-time.json31
85 files changed, 680 insertions, 22 deletions
diff --git a/remotes/draft2019-09/metaschema-no-validation.json b/remotes/draft2019-09/metaschema-no-validation.json
new file mode 100644
index 0000000..9a54944
--- /dev/null
+++ b/remotes/draft2019-09/metaschema-no-validation.json
@@ -0,0 +1,11 @@
+{
+ "$id": "http://localhost:1234/draft2019-09/metaschema-no-validation.json",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true,
+ "https://json-schema.org/draft/2019-09/vocab/core": true
+ },
+ "allOf": [
+ { "$ref": "https://json-schema.org/draft/2019-09/meta/applicator" },
+ { "$ref": "https://json-schema.org/draft/2019-09/meta/core" }
+ ]
+}
diff --git a/remotes/draft2020-12/metaschema-no-validation.json b/remotes/draft2020-12/metaschema-no-validation.json
new file mode 100644
index 0000000..d71f440
--- /dev/null
+++ b/remotes/draft2020-12/metaschema-no-validation.json
@@ -0,0 +1,11 @@
+{
+ "$id": "http://localhost:1234/draft2020-12/metaschema-no-validation.json",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
+ "https://json-schema.org/draft/2020-12/vocab/core": true
+ },
+ "allOf": [
+ { "$ref": "https://json-schema.org/draft/2020-12/meta/applicator" },
+ { "$ref": "https://json-schema.org/draft/2020-12/meta/core" }
+ ]
+}
diff --git a/remotes/extendible-dynamic-ref.json b/remotes/extendible-dynamic-ref.json
new file mode 100644
index 0000000..d0bcd37
--- /dev/null
+++ b/remotes/extendible-dynamic-ref.json
@@ -0,0 +1,20 @@
+{
+ "description": "extendible array",
+ "$id": "http://localhost:1234/extendible-dynamic-ref.json",
+ "type": "object",
+ "properties": {
+ "elements": {
+ "type": "array",
+ "items": {
+ "$dynamicRef": "#elements"
+ }
+ }
+ },
+ "required": ["elements"],
+ "additionalProperties": false,
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements"
+ }
+ }
+}
diff --git a/remotes/tree.json b/remotes/tree.json
new file mode 100644
index 0000000..a12d98b
--- /dev/null
+++ b/remotes/tree.json
@@ -0,0 +1,16 @@
+{
+ "description": "tree schema, extensible",
+ "$id": "http://localhost:1234/tree.json",
+ "$dynamicAnchor": "node",
+
+ "type": "object",
+ "properties": {
+ "data": true,
+ "children": {
+ "type": "array",
+ "items": {
+ "$dynamicRef": "#node"
+ }
+ }
+ }
+}
diff --git a/tests/draft-future/additionalProperties.json b/tests/draft-next/additionalProperties.json
index 381275a..381275a 100644
--- a/tests/draft-future/additionalProperties.json
+++ b/tests/draft-next/additionalProperties.json
diff --git a/tests/draft-future/allOf.json b/tests/draft-next/allOf.json
index ec9319e..ec9319e 100644
--- a/tests/draft-future/allOf.json
+++ b/tests/draft-next/allOf.json
diff --git a/tests/draft-future/anchor.json b/tests/draft-next/anchor.json
index 416c224..416c224 100644
--- a/tests/draft-future/anchor.json
+++ b/tests/draft-next/anchor.json
diff --git a/tests/draft-future/anyOf.json b/tests/draft-next/anyOf.json
index ab5eb38..ab5eb38 100644
--- a/tests/draft-future/anyOf.json
+++ b/tests/draft-next/anyOf.json
diff --git a/tests/draft-future/boolean_schema.json b/tests/draft-next/boolean_schema.json
index 6d40f23..6d40f23 100644
--- a/tests/draft-future/boolean_schema.json
+++ b/tests/draft-next/boolean_schema.json
diff --git a/tests/draft-future/const.json b/tests/draft-next/const.json
index 1c2cafc..1c2cafc 100644
--- a/tests/draft-future/const.json
+++ b/tests/draft-next/const.json
diff --git a/tests/draft-future/contains.json b/tests/draft-next/contains.json
index 4fca81a..4fca81a 100644
--- a/tests/draft-future/contains.json
+++ b/tests/draft-next/contains.json
diff --git a/tests/draft-future/content.json b/tests/draft-next/content.json
index 44688e8..44688e8 100644
--- a/tests/draft-future/content.json
+++ b/tests/draft-next/content.json
diff --git a/tests/draft-future/default.json b/tests/draft-next/default.json
index 289a9b6..289a9b6 100644
--- a/tests/draft-future/default.json
+++ b/tests/draft-next/default.json
diff --git a/tests/draft-future/defs.json b/tests/draft-next/defs.json
index 5dcdca6..5dcdca6 100644
--- a/tests/draft-future/defs.json
+++ b/tests/draft-next/defs.json
diff --git a/tests/draft-future/dependentRequired.json b/tests/draft-next/dependentRequired.json
index c817120..c817120 100644
--- a/tests/draft-future/dependentRequired.json
+++ b/tests/draft-next/dependentRequired.json
diff --git a/tests/draft-future/dependentSchemas.json b/tests/draft-next/dependentSchemas.json
index e7921d1..e7921d1 100644
--- a/tests/draft-future/dependentSchemas.json
+++ b/tests/draft-next/dependentSchemas.json
diff --git a/tests/draft-future/dynamicRef.json b/tests/draft-next/dynamicRef.json
index 40ed6d3..f420542 100644
--- a/tests/draft-future/dynamicRef.json
+++ b/tests/draft-next/dynamicRef.json
@@ -441,5 +441,179 @@
"valid": true
}
]
+ },
+ {
+ "description": "strict-tree schema, guards against misspelled properties",
+ "schema": {
+ "$id": "http://localhost:1234/strict-tree.json",
+ "$dynamicAnchor": "node",
+
+ "$ref": "tree.json",
+ "unevaluatedProperties": false
+ },
+ "tests": [
+ {
+ "description": "instance with misspelled field",
+ "data": {
+ "children": [{
+ "daat": 1
+ }]
+ },
+ "valid": false
+ },
+ {
+ "description": "instance with correct field",
+ "data": {
+ "children": [{
+ "data": 1
+ }]
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "tests for implementation dynamic anchor and reference link",
+ "schema": {
+ "$id": "http://localhost:1234/strict-extendible.json",
+ "$ref": "extendible-dynamic-ref.json",
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements",
+ "properties": {
+ "a": true
+ },
+ "required": ["a"],
+ "additionalProperties": false
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "incorrect parent schema",
+ "data": {
+ "a": true
+ },
+ "valid": false
+ },
+ {
+ "description": "incorrect extended schema",
+ "data": {
+ "elements": [
+ { "b": 1 }
+ ]
+ },
+ "valid": false
+ },
+ {
+ "description": "correct extended schema",
+ "data": {
+ "elements": [
+ { "a": 1 }
+ ]
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.",
+ "schema": {
+ "$id": "http://localhost:1234/strict-extendible-allof-defs-first.json",
+ "allOf": [
+ {
+ "$ref": "extendible-dynamic-ref.json"
+ },
+ {
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements",
+ "properties": {
+ "a": true
+ },
+ "required": ["a"],
+ "additionalProperties": false
+ }
+ }
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "incorrect parent schema",
+ "data": {
+ "a": true
+ },
+ "valid": false
+ },
+ {
+ "description": "incorrect extended schema",
+ "data": {
+ "elements": [
+ { "b": 1 }
+ ]
+ },
+ "valid": false
+ },
+ {
+ "description": "correct extended schema",
+ "data": {
+ "elements": [
+ { "a": 1 }
+ ]
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.",
+ "schema": {
+ "$id": "http://localhost:1234/strict-extendible-allof-ref-first.json",
+ "allOf": [
+ {
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements",
+ "properties": {
+ "a": true
+ },
+ "required": ["a"],
+ "additionalProperties": false
+ }
+ }
+ },
+ {
+ "$ref": "extendible-dynamic-ref.json"
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "incorrect parent schema",
+ "data": {
+ "a": true
+ },
+ "valid": false
+ },
+ {
+ "description": "incorrect extended schema",
+ "data": {
+ "elements": [
+ { "b": 1 }
+ ]
+ },
+ "valid": false
+ },
+ {
+ "description": "correct extended schema",
+ "data": {
+ "elements": [
+ { "a": 1 }
+ ]
+ },
+ "valid": true
+ }
+ ]
}
]
diff --git a/tests/draft-future/enum.json b/tests/draft-next/enum.json
index f085097..f085097 100644
--- a/tests/draft-future/enum.json
+++ b/tests/draft-next/enum.json
diff --git a/tests/draft-future/exclusiveMaximum.json b/tests/draft-next/exclusiveMaximum.json
index dc3cd70..dc3cd70 100644
--- a/tests/draft-future/exclusiveMaximum.json
+++ b/tests/draft-next/exclusiveMaximum.json
diff --git a/tests/draft-future/exclusiveMinimum.json b/tests/draft-next/exclusiveMinimum.json
index b38d7ec..b38d7ec 100644
--- a/tests/draft-future/exclusiveMinimum.json
+++ b/tests/draft-next/exclusiveMinimum.json
diff --git a/tests/draft-future/format.json b/tests/draft-next/format.json
index a4b51d2..a4b51d2 100644
--- a/tests/draft-future/format.json
+++ b/tests/draft-next/format.json
diff --git a/tests/draft-future/id.json b/tests/draft-next/id.json
index 6bdab33..c5eab10 100644
--- a/tests/draft-future/id.json
+++ b/tests/draft-next/id.json
@@ -2,7 +2,7 @@
{
"description": "Invalid use of fragments in location-independent $id",
"schema": {
- "$ref": "https://json-schema.org/draft/future/schema"
+ "$ref": "https://json-schema.org/draft/next/schema"
},
"tests": [
{
@@ -110,7 +110,7 @@
"description": "Valid use of empty fragments in location-independent $id",
"comment": "These are allowed but discouraged",
"schema": {
- "$ref": "https://json-schema.org/draft/future/schema"
+ "$ref": "https://json-schema.org/draft/next/schema"
},
"tests": [
{
@@ -150,7 +150,7 @@
{
"description": "Unnormalized $ids are allowed but discouraged",
"schema": {
- "$ref": "https://json-schema.org/draft/future/schema"
+ "$ref": "https://json-schema.org/draft/next/schema"
},
"tests": [
{
diff --git a/tests/draft-future/if-then-else.json b/tests/draft-next/if-then-else.json
index 284e919..284e919 100644
--- a/tests/draft-future/if-then-else.json
+++ b/tests/draft-next/if-then-else.json
diff --git a/tests/draft-future/infinite-loop-detection.json b/tests/draft-next/infinite-loop-detection.json
index 9c3c362..9c3c362 100644
--- a/tests/draft-future/infinite-loop-detection.json
+++ b/tests/draft-next/infinite-loop-detection.json
diff --git a/tests/draft-future/items.json b/tests/draft-next/items.json
index b918194..b918194 100644
--- a/tests/draft-future/items.json
+++ b/tests/draft-next/items.json
diff --git a/tests/draft-future/maxContains.json b/tests/draft-next/maxContains.json
index e95bb9f..e95bb9f 100644
--- a/tests/draft-future/maxContains.json
+++ b/tests/draft-next/maxContains.json
diff --git a/tests/draft-future/maxItems.json b/tests/draft-next/maxItems.json
index 3b53a6b..3b53a6b 100644
--- a/tests/draft-future/maxItems.json
+++ b/tests/draft-next/maxItems.json
diff --git a/tests/draft-future/maxLength.json b/tests/draft-next/maxLength.json
index 811d35b..811d35b 100644
--- a/tests/draft-future/maxLength.json
+++ b/tests/draft-next/maxLength.json
diff --git a/tests/draft-future/maxProperties.json b/tests/draft-next/maxProperties.json
index aa7209f..aa7209f 100644
--- a/tests/draft-future/maxProperties.json
+++ b/tests/draft-next/maxProperties.json
diff --git a/tests/draft-future/maximum.json b/tests/draft-next/maximum.json
index 6844a39..6844a39 100644
--- a/tests/draft-future/maximum.json
+++ b/tests/draft-next/maximum.json
diff --git a/tests/draft-future/minContains.json b/tests/draft-next/minContains.json
index 287cfca..287cfca 100644
--- a/tests/draft-future/minContains.json
+++ b/tests/draft-next/minContains.json
diff --git a/tests/draft-future/minItems.json b/tests/draft-next/minItems.json
index ed51188..ed51188 100644
--- a/tests/draft-future/minItems.json
+++ b/tests/draft-next/minItems.json
diff --git a/tests/draft-future/minLength.json b/tests/draft-next/minLength.json
index 3f09158..3f09158 100644
--- a/tests/draft-future/minLength.json
+++ b/tests/draft-next/minLength.json
diff --git a/tests/draft-future/minProperties.json b/tests/draft-next/minProperties.json
index 49a0726..49a0726 100644
--- a/tests/draft-future/minProperties.json
+++ b/tests/draft-next/minProperties.json
diff --git a/tests/draft-future/minimum.json b/tests/draft-next/minimum.json
index 21ae50e..21ae50e 100644
--- a/tests/draft-future/minimum.json
+++ b/tests/draft-next/minimum.json
diff --git a/tests/draft-future/multipleOf.json b/tests/draft-next/multipleOf.json
index faa87cf..faa87cf 100644
--- a/tests/draft-future/multipleOf.json
+++ b/tests/draft-next/multipleOf.json
diff --git a/tests/draft-future/not.json b/tests/draft-next/not.json
index 98de0ed..98de0ed 100644
--- a/tests/draft-future/not.json
+++ b/tests/draft-next/not.json
diff --git a/tests/draft-future/oneOf.json b/tests/draft-next/oneOf.json
index eeb7ae8..eeb7ae8 100644
--- a/tests/draft-future/oneOf.json
+++ b/tests/draft-next/oneOf.json
diff --git a/tests/draft-future/optional/bignum.json b/tests/draft-next/optional/bignum.json
index 3f49226..3f49226 100644
--- a/tests/draft-future/optional/bignum.json
+++ b/tests/draft-next/optional/bignum.json
diff --git a/tests/draft-future/optional/ecmascript-regex.json b/tests/draft-next/optional/ecmascript-regex.json
index 1beb0b3..1beb0b3 100644
--- a/tests/draft-future/optional/ecmascript-regex.json
+++ b/tests/draft-next/optional/ecmascript-regex.json
diff --git a/tests/draft-future/optional/float-overflow.json b/tests/draft-next/optional/float-overflow.json
index 52ff982..52ff982 100644
--- a/tests/draft-future/optional/float-overflow.json
+++ b/tests/draft-next/optional/float-overflow.json
diff --git a/tests/draft-future/optional/format-assertion.json b/tests/draft-next/optional/format-assertion.json
index 0340037..0340037 100644
--- a/tests/draft-future/optional/format-assertion.json
+++ b/tests/draft-next/optional/format-assertion.json
diff --git a/tests/draft-future/optional/format/date-time.json b/tests/draft-next/optional/format/date-time.json
index 119179c..f4f9933 100644
--- a/tests/draft-future/optional/format/date-time.json
+++ b/tests/draft-next/optional/format/date-time.json
@@ -54,13 +54,38 @@
"valid": true
},
{
- "description": "a invalid day in date-time string",
- "data": "1990-02-31T15:59:60.123-08:00",
+ "description": "a valid date-time with a leap second, UTC",
+ "data": "1998-12-31T23:59:60Z",
+ "valid": true
+ },
+ {
+ "description": "a valid date-time with a leap second, with minus offset",
+ "data": "1998-12-31T15:59:60.123-08:00",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time past leap second, UTC",
+ "data": "1998-12-31T23:59:61Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong minute, UTC",
+ "data": "1998-12-31T23:58:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong hour, UTC",
+ "data": "1998-12-31T22:59:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid day in date-time string",
+ "data": "1990-02-31T15:59:59.123-08:00",
"valid": false
},
{
"description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:60-24:00",
+ "data": "1990-12-31T15:59:59-24:00",
"valid": false
},
{
diff --git a/tests/draft-future/optional/format/date.json b/tests/draft-next/optional/format/date.json
index b4f61ee..b4f61ee 100644
--- a/tests/draft-future/optional/format/date.json
+++ b/tests/draft-next/optional/format/date.json
diff --git a/tests/draft-future/optional/format/duration.json b/tests/draft-next/optional/format/duration.json
index 741348a..741348a 100644
--- a/tests/draft-future/optional/format/duration.json
+++ b/tests/draft-next/optional/format/duration.json
diff --git a/tests/draft-future/optional/format/email.json b/tests/draft-next/optional/format/email.json
index d6761a4..d6761a4 100644
--- a/tests/draft-future/optional/format/email.json
+++ b/tests/draft-next/optional/format/email.json
diff --git a/tests/draft-future/optional/format/hostname.json b/tests/draft-next/optional/format/hostname.json
index 8a67fda..8a67fda 100644
--- a/tests/draft-future/optional/format/hostname.json
+++ b/tests/draft-next/optional/format/hostname.json
diff --git a/tests/draft-future/optional/format/idn-email.json b/tests/draft-next/optional/format/idn-email.json
index 6e21374..6e21374 100644
--- a/tests/draft-future/optional/format/idn-email.json
+++ b/tests/draft-next/optional/format/idn-email.json
diff --git a/tests/draft-future/optional/format/idn-hostname.json b/tests/draft-next/optional/format/idn-hostname.json
index 6c8f86a..6c8f86a 100644
--- a/tests/draft-future/optional/format/idn-hostname.json
+++ b/tests/draft-next/optional/format/idn-hostname.json
diff --git a/tests/draft-future/optional/format/ipv4.json b/tests/draft-next/optional/format/ipv4.json
index 6b166c7..6b166c7 100644
--- a/tests/draft-future/optional/format/ipv4.json
+++ b/tests/draft-next/optional/format/ipv4.json
diff --git a/tests/draft-future/optional/format/ipv6.json b/tests/draft-next/optional/format/ipv6.json
index 6379927..6379927 100644
--- a/tests/draft-future/optional/format/ipv6.json
+++ b/tests/draft-next/optional/format/ipv6.json
diff --git a/tests/draft-future/optional/format/iri-reference.json b/tests/draft-next/optional/format/iri-reference.json
index c6b4c22..c6b4c22 100644
--- a/tests/draft-future/optional/format/iri-reference.json
+++ b/tests/draft-next/optional/format/iri-reference.json
diff --git a/tests/draft-future/optional/format/iri.json b/tests/draft-next/optional/format/iri.json
index a0d12ae..a0d12ae 100644
--- a/tests/draft-future/optional/format/iri.json
+++ b/tests/draft-next/optional/format/iri.json
diff --git a/tests/draft-future/optional/format/json-pointer.json b/tests/draft-next/optional/format/json-pointer.json
index a0346b5..a0346b5 100644
--- a/tests/draft-future/optional/format/json-pointer.json
+++ b/tests/draft-next/optional/format/json-pointer.json
diff --git a/tests/draft-future/optional/format/regex.json b/tests/draft-next/optional/format/regex.json
index 3449177..3449177 100644
--- a/tests/draft-future/optional/format/regex.json
+++ b/tests/draft-next/optional/format/regex.json
diff --git a/tests/draft-future/optional/format/relative-json-pointer.json b/tests/draft-next/optional/format/relative-json-pointer.json
index 9309986..9309986 100644
--- a/tests/draft-future/optional/format/relative-json-pointer.json
+++ b/tests/draft-next/optional/format/relative-json-pointer.json
diff --git a/tests/draft-future/optional/format/time.json b/tests/draft-next/optional/format/time.json
index 5011d78..5011d78 100644
--- a/tests/draft-future/optional/format/time.json
+++ b/tests/draft-next/optional/format/time.json
diff --git a/tests/draft-future/optional/format/uri-reference.json b/tests/draft-next/optional/format/uri-reference.json
index 7cdf228..7cdf228 100644
--- a/tests/draft-future/optional/format/uri-reference.json
+++ b/tests/draft-next/optional/format/uri-reference.json
diff --git a/tests/draft-future/optional/format/uri-template.json b/tests/draft-next/optional/format/uri-template.json
index df355c5..df355c5 100644
--- a/tests/draft-future/optional/format/uri-template.json
+++ b/tests/draft-next/optional/format/uri-template.json
diff --git a/tests/draft-future/optional/format/uri.json b/tests/draft-next/optional/format/uri.json
index 792d71a..792d71a 100644
--- a/tests/draft-future/optional/format/uri.json
+++ b/tests/draft-next/optional/format/uri.json
diff --git a/tests/draft-future/optional/format/uuid.json b/tests/draft-next/optional/format/uuid.json
index e54cbc0..e54cbc0 100644
--- a/tests/draft-future/optional/format/uuid.json
+++ b/tests/draft-next/optional/format/uuid.json
diff --git a/tests/draft-future/optional/non-bmp-regex.json b/tests/draft-next/optional/non-bmp-regex.json
index dd67af2..dd67af2 100644
--- a/tests/draft-future/optional/non-bmp-regex.json
+++ b/tests/draft-next/optional/non-bmp-regex.json
diff --git a/tests/draft-future/optional/refOfUnknownKeyword.json b/tests/draft-next/optional/refOfUnknownKeyword.json
index 5b150df..5b150df 100644
--- a/tests/draft-future/optional/refOfUnknownKeyword.json
+++ b/tests/draft-next/optional/refOfUnknownKeyword.json
diff --git a/tests/draft-future/pattern.json b/tests/draft-next/pattern.json
index 92db0f9..92db0f9 100644
--- a/tests/draft-future/pattern.json
+++ b/tests/draft-next/pattern.json
diff --git a/tests/draft-future/patternProperties.json b/tests/draft-next/patternProperties.json
index c10ffcc..c10ffcc 100644
--- a/tests/draft-future/patternProperties.json
+++ b/tests/draft-next/patternProperties.json
diff --git a/tests/draft-future/prefixItems.json b/tests/draft-next/prefixItems.json
index 7d0571e..7d0571e 100644
--- a/tests/draft-future/prefixItems.json
+++ b/tests/draft-next/prefixItems.json
diff --git a/tests/draft-future/properties.json b/tests/draft-next/properties.json
index b86c181..b86c181 100644
--- a/tests/draft-future/properties.json
+++ b/tests/draft-next/properties.json
diff --git a/tests/draft-future/propertyNames.json b/tests/draft-next/propertyNames.json
index 8423690..8423690 100644
--- a/tests/draft-future/propertyNames.json
+++ b/tests/draft-next/propertyNames.json
diff --git a/tests/draft-future/ref.json b/tests/draft-next/ref.json
index 4bb12f5..bc87c9e 100644
--- a/tests/draft-future/ref.json
+++ b/tests/draft-next/ref.json
@@ -178,7 +178,7 @@
{
"description": "remote ref, containing refs itself",
"schema": {
- "$ref": "https://json-schema.org/draft/future/schema"
+ "$ref": "https://json-schema.org/draft/next/schema"
},
"tests": [
{
diff --git a/tests/draft-future/refRemote.json b/tests/draft-next/refRemote.json
index b607432..b607432 100644
--- a/tests/draft-future/refRemote.json
+++ b/tests/draft-next/refRemote.json
diff --git a/tests/draft-future/required.json b/tests/draft-next/required.json
index abf18f3..abf18f3 100644
--- a/tests/draft-future/required.json
+++ b/tests/draft-next/required.json
diff --git a/tests/draft-future/type.json b/tests/draft-next/type.json
index 8304647..8304647 100644
--- a/tests/draft-future/type.json
+++ b/tests/draft-next/type.json
diff --git a/tests/draft-future/unevaluatedItems.json b/tests/draft-next/unevaluatedItems.json
index 0061769..0061769 100644
--- a/tests/draft-future/unevaluatedItems.json
+++ b/tests/draft-next/unevaluatedItems.json
diff --git a/tests/draft-future/unevaluatedProperties.json b/tests/draft-next/unevaluatedProperties.json
index bfcb79d..bfcb79d 100644
--- a/tests/draft-future/unevaluatedProperties.json
+++ b/tests/draft-next/unevaluatedProperties.json
diff --git a/tests/draft-future/uniqueItems.json b/tests/draft-next/uniqueItems.json
index b3762cb..b3762cb 100644
--- a/tests/draft-future/uniqueItems.json
+++ b/tests/draft-next/uniqueItems.json
diff --git a/tests/draft-future/unknownKeyword.json b/tests/draft-next/unknownKeyword.json
index e46657d..e46657d 100644
--- a/tests/draft-future/unknownKeyword.json
+++ b/tests/draft-next/unknownKeyword.json
diff --git a/tests/draft-next/vocabulary.json b/tests/draft-next/vocabulary.json
new file mode 100644
index 0000000..b6997b4
--- /dev/null
+++ b/tests/draft-next/vocabulary.json
@@ -0,0 +1,34 @@
+[
+ {
+ "description": "schema that uses custom metaschema with with no validation vocabulary",
+ "schema": {
+ "$id": "https://schema/using/no/validation",
+ "$schema": "http://localhost:1234/draft2020-12/metaschema-no-validation.json",
+ "properties": {
+ "badProperty": false,
+ "numberProperty": {
+ "minimum": 10
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "applicator vocabulary still works",
+ "data": {
+ "badProperty": "this property should not exist"
+ },
+ "valid": false
+ },
+ {
+ "description": "no validation: valid number",
+ "data": 20,
+ "valid": true
+ },
+ {
+ "description": "no validation: invalid number, but it still validates",
+ "data": 1,
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/tests/draft2019-09/optional/format/date-time.json b/tests/draft2019-09/optional/format/date-time.json
index 119179c..f4f9933 100644
--- a/tests/draft2019-09/optional/format/date-time.json
+++ b/tests/draft2019-09/optional/format/date-time.json
@@ -54,13 +54,38 @@
"valid": true
},
{
- "description": "a invalid day in date-time string",
- "data": "1990-02-31T15:59:60.123-08:00",
+ "description": "a valid date-time with a leap second, UTC",
+ "data": "1998-12-31T23:59:60Z",
+ "valid": true
+ },
+ {
+ "description": "a valid date-time with a leap second, with minus offset",
+ "data": "1998-12-31T15:59:60.123-08:00",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time past leap second, UTC",
+ "data": "1998-12-31T23:59:61Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong minute, UTC",
+ "data": "1998-12-31T23:58:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong hour, UTC",
+ "data": "1998-12-31T22:59:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid day in date-time string",
+ "data": "1990-02-31T15:59:59.123-08:00",
"valid": false
},
{
"description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:60-24:00",
+ "data": "1990-12-31T15:59:59-24:00",
"valid": false
},
{
diff --git a/tests/draft2019-09/vocabulary.json b/tests/draft2019-09/vocabulary.json
new file mode 100644
index 0000000..79c3ad8
--- /dev/null
+++ b/tests/draft2019-09/vocabulary.json
@@ -0,0 +1,34 @@
+[
+ {
+ "description": "schema that uses custom metaschema with with no validation vocabulary",
+ "schema": {
+ "$id": "https://schema/using/no/validation",
+ "$schema": "http://localhost:1234/draft2019-09/metaschema-no-validation.json",
+ "properties": {
+ "badProperty": false,
+ "numberProperty": {
+ "minimum": 10
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "applicator vocabulary still works",
+ "data": {
+ "badProperty": "this property should not exist"
+ },
+ "valid": false
+ },
+ {
+ "description": "no validation: valid number",
+ "data": 20,
+ "valid": true
+ },
+ {
+ "description": "no validation: invalid number, but it still validates",
+ "data": 1,
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/tests/draft2020-12/dynamicRef.json b/tests/draft2020-12/dynamicRef.json
index 40ed6d3..f420542 100644
--- a/tests/draft2020-12/dynamicRef.json
+++ b/tests/draft2020-12/dynamicRef.json
@@ -441,5 +441,179 @@
"valid": true
}
]
+ },
+ {
+ "description": "strict-tree schema, guards against misspelled properties",
+ "schema": {
+ "$id": "http://localhost:1234/strict-tree.json",
+ "$dynamicAnchor": "node",
+
+ "$ref": "tree.json",
+ "unevaluatedProperties": false
+ },
+ "tests": [
+ {
+ "description": "instance with misspelled field",
+ "data": {
+ "children": [{
+ "daat": 1
+ }]
+ },
+ "valid": false
+ },
+ {
+ "description": "instance with correct field",
+ "data": {
+ "children": [{
+ "data": 1
+ }]
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "tests for implementation dynamic anchor and reference link",
+ "schema": {
+ "$id": "http://localhost:1234/strict-extendible.json",
+ "$ref": "extendible-dynamic-ref.json",
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements",
+ "properties": {
+ "a": true
+ },
+ "required": ["a"],
+ "additionalProperties": false
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "incorrect parent schema",
+ "data": {
+ "a": true
+ },
+ "valid": false
+ },
+ {
+ "description": "incorrect extended schema",
+ "data": {
+ "elements": [
+ { "b": 1 }
+ ]
+ },
+ "valid": false
+ },
+ {
+ "description": "correct extended schema",
+ "data": {
+ "elements": [
+ { "a": 1 }
+ ]
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.",
+ "schema": {
+ "$id": "http://localhost:1234/strict-extendible-allof-defs-first.json",
+ "allOf": [
+ {
+ "$ref": "extendible-dynamic-ref.json"
+ },
+ {
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements",
+ "properties": {
+ "a": true
+ },
+ "required": ["a"],
+ "additionalProperties": false
+ }
+ }
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "incorrect parent schema",
+ "data": {
+ "a": true
+ },
+ "valid": false
+ },
+ {
+ "description": "incorrect extended schema",
+ "data": {
+ "elements": [
+ { "b": 1 }
+ ]
+ },
+ "valid": false
+ },
+ {
+ "description": "correct extended schema",
+ "data": {
+ "elements": [
+ { "a": 1 }
+ ]
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.",
+ "schema": {
+ "$id": "http://localhost:1234/strict-extendible-allof-ref-first.json",
+ "allOf": [
+ {
+ "$defs": {
+ "elements": {
+ "$dynamicAnchor": "elements",
+ "properties": {
+ "a": true
+ },
+ "required": ["a"],
+ "additionalProperties": false
+ }
+ }
+ },
+ {
+ "$ref": "extendible-dynamic-ref.json"
+ }
+ ]
+ },
+ "tests": [
+ {
+ "description": "incorrect parent schema",
+ "data": {
+ "a": true
+ },
+ "valid": false
+ },
+ {
+ "description": "incorrect extended schema",
+ "data": {
+ "elements": [
+ { "b": 1 }
+ ]
+ },
+ "valid": false
+ },
+ {
+ "description": "correct extended schema",
+ "data": {
+ "elements": [
+ { "a": 1 }
+ ]
+ },
+ "valid": true
+ }
+ ]
}
]
diff --git a/tests/draft2020-12/optional/format/date-time.json b/tests/draft2020-12/optional/format/date-time.json
index 119179c..f4f9933 100644
--- a/tests/draft2020-12/optional/format/date-time.json
+++ b/tests/draft2020-12/optional/format/date-time.json
@@ -54,13 +54,38 @@
"valid": true
},
{
- "description": "a invalid day in date-time string",
- "data": "1990-02-31T15:59:60.123-08:00",
+ "description": "a valid date-time with a leap second, UTC",
+ "data": "1998-12-31T23:59:60Z",
+ "valid": true
+ },
+ {
+ "description": "a valid date-time with a leap second, with minus offset",
+ "data": "1998-12-31T15:59:60.123-08:00",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time past leap second, UTC",
+ "data": "1998-12-31T23:59:61Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong minute, UTC",
+ "data": "1998-12-31T23:58:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong hour, UTC",
+ "data": "1998-12-31T22:59:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid day in date-time string",
+ "data": "1990-02-31T15:59:59.123-08:00",
"valid": false
},
{
"description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:60-24:00",
+ "data": "1990-12-31T15:59:59-24:00",
"valid": false
},
{
diff --git a/tests/draft2020-12/vocabulary.json b/tests/draft2020-12/vocabulary.json
new file mode 100644
index 0000000..b6997b4
--- /dev/null
+++ b/tests/draft2020-12/vocabulary.json
@@ -0,0 +1,34 @@
+[
+ {
+ "description": "schema that uses custom metaschema with with no validation vocabulary",
+ "schema": {
+ "$id": "https://schema/using/no/validation",
+ "$schema": "http://localhost:1234/draft2020-12/metaschema-no-validation.json",
+ "properties": {
+ "badProperty": false,
+ "numberProperty": {
+ "minimum": 10
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "applicator vocabulary still works",
+ "data": {
+ "badProperty": "this property should not exist"
+ },
+ "valid": false
+ },
+ {
+ "description": "no validation: valid number",
+ "data": 20,
+ "valid": true
+ },
+ {
+ "description": "no validation: invalid number, but it still validates",
+ "data": 1,
+ "valid": true
+ }
+ ]
+ }
+]
diff --git a/tests/draft4/optional/format/date-time.json b/tests/draft4/optional/format/date-time.json
index 119179c..f4f9933 100644
--- a/tests/draft4/optional/format/date-time.json
+++ b/tests/draft4/optional/format/date-time.json
@@ -54,13 +54,38 @@
"valid": true
},
{
- "description": "a invalid day in date-time string",
- "data": "1990-02-31T15:59:60.123-08:00",
+ "description": "a valid date-time with a leap second, UTC",
+ "data": "1998-12-31T23:59:60Z",
+ "valid": true
+ },
+ {
+ "description": "a valid date-time with a leap second, with minus offset",
+ "data": "1998-12-31T15:59:60.123-08:00",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time past leap second, UTC",
+ "data": "1998-12-31T23:59:61Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong minute, UTC",
+ "data": "1998-12-31T23:58:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong hour, UTC",
+ "data": "1998-12-31T22:59:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid day in date-time string",
+ "data": "1990-02-31T15:59:59.123-08:00",
"valid": false
},
{
"description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:60-24:00",
+ "data": "1990-12-31T15:59:59-24:00",
"valid": false
},
{
diff --git a/tests/draft6/optional/format/date-time.json b/tests/draft6/optional/format/date-time.json
index 119179c..f4f9933 100644
--- a/tests/draft6/optional/format/date-time.json
+++ b/tests/draft6/optional/format/date-time.json
@@ -54,13 +54,38 @@
"valid": true
},
{
- "description": "a invalid day in date-time string",
- "data": "1990-02-31T15:59:60.123-08:00",
+ "description": "a valid date-time with a leap second, UTC",
+ "data": "1998-12-31T23:59:60Z",
+ "valid": true
+ },
+ {
+ "description": "a valid date-time with a leap second, with minus offset",
+ "data": "1998-12-31T15:59:60.123-08:00",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time past leap second, UTC",
+ "data": "1998-12-31T23:59:61Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong minute, UTC",
+ "data": "1998-12-31T23:58:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong hour, UTC",
+ "data": "1998-12-31T22:59:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid day in date-time string",
+ "data": "1990-02-31T15:59:59.123-08:00",
"valid": false
},
{
"description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:60-24:00",
+ "data": "1990-12-31T15:59:59-24:00",
"valid": false
},
{
diff --git a/tests/draft7/optional/format/date-time.json b/tests/draft7/optional/format/date-time.json
index 119179c..f4f9933 100644
--- a/tests/draft7/optional/format/date-time.json
+++ b/tests/draft7/optional/format/date-time.json
@@ -54,13 +54,38 @@
"valid": true
},
{
- "description": "a invalid day in date-time string",
- "data": "1990-02-31T15:59:60.123-08:00",
+ "description": "a valid date-time with a leap second, UTC",
+ "data": "1998-12-31T23:59:60Z",
+ "valid": true
+ },
+ {
+ "description": "a valid date-time with a leap second, with minus offset",
+ "data": "1998-12-31T15:59:60.123-08:00",
+ "valid": true
+ },
+ {
+ "description": "an invalid date-time past leap second, UTC",
+ "data": "1998-12-31T23:59:61Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong minute, UTC",
+ "data": "1998-12-31T23:58:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid date-time with leap second on a wrong hour, UTC",
+ "data": "1998-12-31T22:59:60Z",
+ "valid": false
+ },
+ {
+ "description": "an invalid day in date-time string",
+ "data": "1990-02-31T15:59:59.123-08:00",
"valid": false
},
{
"description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:60-24:00",
+ "data": "1990-12-31T15:59:59-24:00",
"valid": false
},
{