Skip to content

Commit 666d6b0

Browse files
committed
1 parent 1047a1a commit 666d6b0

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

tests/draft-next/anchor.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,23 @@
200200
"valid": false
201201
}
202202
]
203+
},
204+
{
205+
"description": "invalid anchors",
206+
"schema": {
207+
"$ref": "https://json-schema.org/draft/2019-09/schema"
208+
},
209+
"tests": [
210+
{
211+
"description": "MUST start with a letter (and not #)",
212+
"data": { "$anchor" : "#foo" },
213+
"valid": false
214+
},
215+
{
216+
"description": "JSON pointers are not valid",
217+
"data": { "$anchor" : "/a/b" },
218+
"valid": false
219+
}
220+
]
203221
}
204222
]

tests/draft2019-09/anchor.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,24 @@
200200
"valid": false
201201
}
202202
]
203+
},
204+
{
205+
"description": "invalid anchors",
206+
"comment": "Section 8.2.3",
207+
"schema": {
208+
"$ref": "https://json-schema.org/draft/2019-09/schema"
209+
},
210+
"tests": [
211+
{
212+
"description": "MUST start with a letter (and not #)",
213+
"data": { "$anchor" : "#foo" },
214+
"valid": false
215+
},
216+
{
217+
"description": "JSON pointers are not valid",
218+
"data": { "$anchor" : "/a/b" },
219+
"valid": false
220+
}
221+
]
203222
}
204223
]

tests/draft2020-12/anchor.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,24 @@
200200
"valid": false
201201
}
202202
]
203+
},
204+
{
205+
"description": "invalid anchors",
206+
"comment": "Section 8.2.2",
207+
"schema": {
208+
"$ref": "https://json-schema.org/draft/2019-09/schema"
209+
},
210+
"tests": [
211+
{
212+
"description": "MUST start with a letter (and not #)",
213+
"data": { "$anchor" : "#foo" },
214+
"valid": false
215+
},
216+
{
217+
"description": "JSON pointers are not valid",
218+
"data": { "$anchor" : "/a/b" },
219+
"valid": false
220+
}
221+
]
203222
}
204223
]

0 commit comments

Comments
 (0)