Skip to content

Commit 3df4712

Browse files
committed
add draft 2019-09 -> draft 2020-12 test
1 parent dab94fa commit 3df4712

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

remotes/draft2020-12/prefixItems.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$id": "http://localhost:1234/draft2020-12/prefixItems.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"prefixItems": [
5+
{"type": "string"}
6+
]
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"description": "refs to future drafts are processed as future drafts",
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"type": "array",
7+
"$ref": "http://localhost:1234/draft2020-12/prefixItems.json"
8+
},
9+
"tests": [
10+
{
11+
"description": "first item not a string is invalid",
12+
"$comment": "if the implementation is not processing the $ref as a 2020-12 schema, this test will fail",
13+
"data": [1, 2, 3],
14+
"valid": false
15+
},
16+
{
17+
"description": "first item is a string is valid",
18+
"data": ["a string", 1, 2, 3],
19+
"valid": true
20+
}
21+
]
22+
}
23+
]

tests/draft7/optional/cross-draft.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"tests": [
1212
{
1313
"description": "missing bar is invalid",
14+
"$comment": "if the implementation is not processing the $ref as a 2019-09 schema, this test will fail",
1415
"data": {"foo": "any value"},
1516
"valid": false
1617
},

0 commit comments

Comments
 (0)