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 | |
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')
-rw-r--r-- | json/README.md | 4 | ||||
-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 |
4 files changed, 67 insertions, 2 deletions
diff --git a/json/README.md b/json/README.md index 250bbb1..1de5391 100644 --- a/json/README.md +++ b/json/README.md @@ -265,9 +265,9 @@ Node-specific support is maintained in a [separate repository](https://github.co ### Perl -* [JSON::Schema::Draft201909](https://github.com/karenetheridge/JSON-Schema-Draft201909) +* [Test::JSON::Schema::Acceptance](https://github.com/karenetheridge/Test-JSON-Schema-Acceptance) (a wrapper of this test suite) +* [JSON::Schema::Modern](https://github.com/karenetheridge/JSON-Schema-Modern) * [JSON::Schema::Tiny](https://github.com/karenetheridge/JSON-Schema-Tiny) -* [Test::JSON::Schema::Acceptance](https://github.com/karenetheridge/Test-JSON-Schema-Acceptance) ### PHP 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 + } + ] } ] |