Skip to content

Commit b62f97c

Browse files
committed
1 parent 1047a1a commit b62f97c

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

tests/draft-next/anchor.json

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

tests/draft2019-09/anchor.json

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

tests/draft2020-12/anchor.json

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

0 commit comments

Comments
 (0)