summaryrefslogtreecommitdiff
path: root/json
diff options
context:
space:
mode:
Diffstat (limited to 'json')
-rw-r--r--json/README.md4
-rw-r--r--json/tests/draft-next/anchor.json21
-rw-r--r--json/tests/draft2019-09/anchor.json22
-rw-r--r--json/tests/draft2020-12/anchor.json22
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
+ }
+ ]
}
]