Skip to content

Commit c08b399

Browse files
committed
[348] Add reference-to-unknown-keyword tests to earlier drafts
Also renaming "reference of" to "reference to".
1 parent d17e1ba commit c08b399

File tree

5 files changed

+178
-2
lines changed

5 files changed

+178
-2
lines changed

tests/draft2019-09/optional/refOfUnknownKeyword.json renamed to tests/draft2019-09/optional/refToUnknownKeyword.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"description": "reference of a root arbitrary keyword ",
3+
"description": "reference to a root arbitrary keyword ",
44
"schema": {
55
"unknown-keyword": {"type": "integer"},
66
"properties": {
@@ -21,7 +21,7 @@
2121
]
2222
},
2323
{
24-
"description": "reference of an arbitrary keyword of a sub-schema",
24+
"description": "reference to an arbitrary keyword of a sub-schema",
2525
"schema": {
2626
"properties": {
2727
"foo": {"unknown-keyword": {"type": "integer"}},
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[
2+
{
3+
"description": "reference to a root arbitrary keyword ",
4+
"schema": {
5+
"unknown-keyword": {"type": "integer"},
6+
"properties": {
7+
"bar": {"$ref": "#/unknown-keyword"}
8+
}
9+
},
10+
"tests": [
11+
{
12+
"description": "match",
13+
"data": {"bar": 3},
14+
"valid": true
15+
},
16+
{
17+
"description": "mismatch",
18+
"data": {"bar": true},
19+
"valid": false
20+
}
21+
]
22+
},
23+
{
24+
"description": "reference to an arbitrary keyword of a sub-schema",
25+
"schema": {
26+
"properties": {
27+
"foo": {"unknown-keyword": {"type": "integer"}},
28+
"bar": {"$ref": "#/properties/foo/unknown-keyword"}
29+
}
30+
},
31+
"tests": [
32+
{
33+
"description": "match",
34+
"data": {"bar": 3},
35+
"valid": true
36+
},
37+
{
38+
"description": "mismatch",
39+
"data": {"bar": true},
40+
"valid": false
41+
}
42+
]
43+
}
44+
]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[
2+
{
3+
"description": "reference to a root arbitrary keyword ",
4+
"schema": {
5+
"unknown-keyword": {"type": "integer"},
6+
"properties": {
7+
"bar": {"$ref": "#/unknown-keyword"}
8+
}
9+
},
10+
"tests": [
11+
{
12+
"description": "match",
13+
"data": {"bar": 3},
14+
"valid": true
15+
},
16+
{
17+
"description": "mismatch",
18+
"data": {"bar": true},
19+
"valid": false
20+
}
21+
]
22+
},
23+
{
24+
"description": "reference to an arbitrary keyword of a sub-schema",
25+
"schema": {
26+
"properties": {
27+
"foo": {"unknown-keyword": {"type": "integer"}},
28+
"bar": {"$ref": "#/properties/foo/unknown-keyword"}
29+
}
30+
},
31+
"tests": [
32+
{
33+
"description": "match",
34+
"data": {"bar": 3},
35+
"valid": true
36+
},
37+
{
38+
"description": "mismatch",
39+
"data": {"bar": true},
40+
"valid": false
41+
}
42+
]
43+
}
44+
]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[
2+
{
3+
"description": "reference to a root arbitrary keyword ",
4+
"schema": {
5+
"unknown-keyword": {"type": "integer"},
6+
"properties": {
7+
"bar": {"$ref": "#/unknown-keyword"}
8+
}
9+
},
10+
"tests": [
11+
{
12+
"description": "match",
13+
"data": {"bar": 3},
14+
"valid": true
15+
},
16+
{
17+
"description": "mismatch",
18+
"data": {"bar": true},
19+
"valid": false
20+
}
21+
]
22+
},
23+
{
24+
"description": "reference to an arbitrary keyword of a sub-schema",
25+
"schema": {
26+
"properties": {
27+
"foo": {"unknown-keyword": {"type": "integer"}},
28+
"bar": {"$ref": "#/properties/foo/unknown-keyword"}
29+
}
30+
},
31+
"tests": [
32+
{
33+
"description": "match",
34+
"data": {"bar": 3},
35+
"valid": true
36+
},
37+
{
38+
"description": "mismatch",
39+
"data": {"bar": true},
40+
"valid": false
41+
}
42+
]
43+
}
44+
]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[
2+
{
3+
"description": "reference to a root arbitrary keyword ",
4+
"schema": {
5+
"unknown-keyword": {"type": "integer"},
6+
"properties": {
7+
"bar": {"$ref": "#/unknown-keyword"}
8+
}
9+
},
10+
"tests": [
11+
{
12+
"description": "match",
13+
"data": {"bar": 3},
14+
"valid": true
15+
},
16+
{
17+
"description": "mismatch",
18+
"data": {"bar": true},
19+
"valid": false
20+
}
21+
]
22+
},
23+
{
24+
"description": "reference to an arbitrary keyword of a sub-schema",
25+
"schema": {
26+
"properties": {
27+
"foo": {"unknown-keyword": {"type": "integer"}},
28+
"bar": {"$ref": "#/properties/foo/unknown-keyword"}
29+
}
30+
},
31+
"tests": [
32+
{
33+
"description": "match",
34+
"data": {"bar": 3},
35+
"valid": true
36+
},
37+
{
38+
"description": "mismatch",
39+
"data": {"bar": true},
40+
"valid": false
41+
}
42+
]
43+
}
44+
]

0 commit comments

Comments
 (0)