Skip to content

Commit 10104f7

Browse files
committed
Squashed 'json/' changes from 1047a1aa..b7d13f4b
b7d13f4b Merge pull request #567 from json-schema-org/invalid-anchors 4811789d Also add an anchor test with valid prefix (but still invalid). b62f97cc Add tests for invalid anchors. af5075ca Merge pull request #568 from json-schema-org/ether/perl-implementations dc5c91e9 update the list of Perl implementations git-subtree-dir: json git-subtree-split: b7d13f4b563b2e4d4ba2af624917333e40ae96da
1 parent cfff411 commit 10104f7

File tree

4 files changed

+67
-2
lines changed

4 files changed

+67
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ Node-specific support is maintained in a [separate repository](https://github.co
265265

266266
### Perl
267267

268-
* [JSON::Schema::Draft201909](https://github.com/karenetheridge/JSON-Schema-Draft201909)
268+
* [Test::JSON::Schema::Acceptance](https://github.com/karenetheridge/Test-JSON-Schema-Acceptance) (a wrapper of this test suite)
269+
* [JSON::Schema::Modern](https://github.com/karenetheridge/JSON-Schema-Modern)
269270
* [JSON::Schema::Tiny](https://github.com/karenetheridge/JSON-Schema-Tiny)
270-
* [Test::JSON::Schema::Acceptance](https://github.com/karenetheridge/Test-JSON-Schema-Acceptance)
271271

272272
### PHP
273273

tests/draft-next/anchor.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,26 @@
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+
{
219+
"description": "invalid with valid beginning",
220+
"data": { "$anchor" : "foo#something" },
221+
"valid": false
222+
}
223+
]
203224
}
204225
]

tests/draft2019-09/anchor.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,27 @@
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+
{
220+
"description": "invalid with valid beginning",
221+
"data": { "$anchor" : "foo#something" },
222+
"valid": false
223+
}
224+
]
203225
}
204226
]

tests/draft2020-12/anchor.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,27 @@
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+
{
220+
"description": "invalid with valid beginning",
221+
"data": { "$anchor" : "foo#something" },
222+
"valid": false
223+
}
224+
]
203225
}
204226
]

0 commit comments

Comments
 (0)