Skip to content

Commit

Permalink
Squashed 'json/' changes from 1047a1aa..b7d13f4b
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Julian committed Jul 2, 2022
1 parent cfff411 commit 10104f7
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ Node-specific support is maintained in a [separate repository](https://github.co

### Perl

* [JSON::Schema::Draft201909](https:/karenetheridge/JSON-Schema-Draft201909)
* [Test::JSON::Schema::Acceptance](https:/karenetheridge/Test-JSON-Schema-Acceptance) (a wrapper of this test suite)
* [JSON::Schema::Modern](https:/karenetheridge/JSON-Schema-Modern)
* [JSON::Schema::Tiny](https:/karenetheridge/JSON-Schema-Tiny)
* [Test::JSON::Schema::Acceptance](https:/karenetheridge/Test-JSON-Schema-Acceptance)

### PHP

Expand Down
21 changes: 21 additions & 0 deletions tests/draft-next/anchor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]
22 changes: 22 additions & 0 deletions tests/draft2019-09/anchor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]
22 changes: 22 additions & 0 deletions tests/draft2020-12/anchor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]

0 comments on commit 10104f7

Please sign in to comment.