summaryrefslogtreecommitdiff
path: root/json/tests
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2022-07-02 16:06:14 -0400
committerJulian Berman <Julian@GrayVines.com>2022-07-02 16:06:14 -0400
commit1f1387b583c026aad94417c320144e9d1b11f7e0 (patch)
tree470b5580ef3104b796dd330197bcf5d3cd09c3d8 /json/tests
parentafc22f09e74d696ab00be8a711bbc5c2a15327b7 (diff)
parent10104f7250d99f6c5225a5aa6ad0975fdbf7d555 (diff)
downloadjsonschema-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.json21
-rw-r--r--json/tests/draft2019-09/anchor.json22
-rw-r--r--json/tests/draft2020-12/anchor.json22
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
+ }
+ ]
}
]