diff options
author | Julian Berman <Julian@GrayVines.com> | 2022-07-02 16:06:14 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2022-07-02 16:06:14 -0400 |
commit | 1f1387b583c026aad94417c320144e9d1b11f7e0 (patch) | |
tree | 470b5580ef3104b796dd330197bcf5d3cd09c3d8 /json/tests | |
parent | afc22f09e74d696ab00be8a711bbc5c2a15327b7 (diff) | |
parent | 10104f7250d99f6c5225a5aa6ad0975fdbf7d555 (diff) | |
download | jsonschema-1f1387b583c026aad94417c320144e9d1b11f7e0.tar.gz |
Merge commit '10104f7250d99f6c5225a5aa6ad0975fdbf7d555'
* commit '10104f7250d99f6c5225a5aa6ad0975fdbf7d555':
Squashed 'json/' changes from 1047a1aa..b7d13f4b
Diffstat (limited to 'json/tests')
-rw-r--r-- | json/tests/draft-next/anchor.json | 21 | ||||
-rw-r--r-- | json/tests/draft2019-09/anchor.json | 22 | ||||
-rw-r--r-- | json/tests/draft2020-12/anchor.json | 22 |
3 files changed, 65 insertions, 0 deletions
diff --git a/json/tests/draft-next/anchor.json b/json/tests/draft-next/anchor.json index 4e8987e..f0fcf02 100644 --- a/json/tests/draft-next/anchor.json +++ b/json/tests/draft-next/anchor.json @@ -200,5 +200,26 @@ "valid": false } ] + }, + { + "description": "invalid anchors", + "schema": { "$ref": "https://json-schema.org/draft/next/schema" }, + "tests": [ + { + "description": "MUST start with a letter (and not #)", + "data": { "$anchor" : "#foo" }, + "valid": false + }, + { + "description": "JSON pointers are not valid", + "data": { "$anchor" : "/a/b" }, + "valid": false + }, + { + "description": "invalid with valid beginning", + "data": { "$anchor" : "foo#something" }, + "valid": false + } + ] } ] diff --git a/json/tests/draft2019-09/anchor.json b/json/tests/draft2019-09/anchor.json index 4e8987e..4143d1f 100644 --- a/json/tests/draft2019-09/anchor.json +++ b/json/tests/draft2019-09/anchor.json @@ -200,5 +200,27 @@ "valid": false } ] + }, + { + "description": "invalid anchors", + "comment": "Section 8.2.3", + "schema": { "$ref": "https://json-schema.org/draft/2019-09/schema" }, + "tests": [ + { + "description": "MUST start with a letter (and not #)", + "data": { "$anchor" : "#foo" }, + "valid": false + }, + { + "description": "JSON pointers are not valid", + "data": { "$anchor" : "/a/b" }, + "valid": false + }, + { + "description": "invalid with valid beginning", + "data": { "$anchor" : "foo#something" }, + "valid": false + } + ] } ] diff --git a/json/tests/draft2020-12/anchor.json b/json/tests/draft2020-12/anchor.json index 4e8987e..17e9080 100644 --- a/json/tests/draft2020-12/anchor.json +++ b/json/tests/draft2020-12/anchor.json @@ -200,5 +200,27 @@ "valid": false } ] + }, + { + "description": "invalid anchors", + "comment": "Section 8.2.2", + "schema": { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + "tests": [ + { + "description": "MUST start with a letter (and not #)", + "data": { "$anchor" : "#foo" }, + "valid": false + }, + { + "description": "JSON pointers are not valid", + "data": { "$anchor" : "/a/b" }, + "valid": false + }, + { + "description": "invalid with valid beginning", + "data": { "$anchor" : "foo#something" }, + "valid": false + } + ] } ] |