Skip to content

Commit d9be1a4

Browse files
committed
Merge commit '75f09dc062084528d31018e9297dab132a997590'
* commit '75f09dc062084528d31018e9297dab132a997590': Squashed 'json/' changes from a9a1e2e..95fe6ca
2 parents aaee6f4 + 75f09dc commit d9be1a4

27 files changed

+247
-129
lines changed

json/output-tests/draft2019-09/content/type.json

-26
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,6 @@
3131
"required": ["errors"]
3232
}
3333
}
34-
},
35-
{
36-
"description": "correct type yields an output unit",
37-
"data": "a string",
38-
"output": {
39-
"basic": {
40-
"$id": "https://json-schema.org/tests/content/draft2019-09/type/0/tests/1/basic",
41-
"$ref": "/draft/2019-09/output/schema",
42-
"properties": {
43-
"annotations": {
44-
"contains": {
45-
"properties": {
46-
"valid": {"const": true},
47-
"keywordLocation": {"const": "/type"},
48-
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2019-09/type/0#/type"},
49-
"instanceLocation": {"const": ""},
50-
"annotation": false,
51-
"error": false
52-
},
53-
"required": ["keywordLocation", "instanceLocation"]
54-
}
55-
}
56-
},
57-
"required": ["annotations"]
58-
}
59-
}
6034
}
6135
]
6236
}

json/output-tests/draft2020-12/content/type.json

-26
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,6 @@
3131
"required": ["errors"]
3232
}
3333
}
34-
},
35-
{
36-
"description": "correct type yields an output unit",
37-
"data": "a string",
38-
"output": {
39-
"basic": {
40-
"$id": "https://json-schema.org/tests/content/draft2020-12/type/0/tests/1/basic",
41-
"$ref": "/draft/2020-12/output/schema",
42-
"properties": {
43-
"annotations": {
44-
"contains": {
45-
"properties": {
46-
"valid": {"const": true},
47-
"keywordLocation": {"const": "/type"},
48-
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/type/0#/type"},
49-
"instanceLocation": {"const": ""},
50-
"annotation": false,
51-
"error": false
52-
},
53-
"required": ["keywordLocation", "instanceLocation"]
54-
}
55-
}
56-
},
57-
"required": ["annotations"]
58-
}
59-
}
6034
}
6135
]
6236
}

json/remotes/draft-next/subSchemas-defs.json

-11
This file was deleted.
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"$schema": "https://json-schema.org/draft/next/schema",
3-
"integer": {
4-
"type": "integer"
5-
},
6-
"refToInteger": {
7-
"$ref": "#/integer"
3+
"$defs": {
4+
"integer": {
5+
"type": "integer"
6+
},
7+
"refToInteger": {
8+
"$ref": "#/$defs/integer"
9+
}
810
}
911
}

json/remotes/draft2019-09/subSchemas-defs.json

-11
This file was deleted.
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"$schema": "https://json-schema.org/draft/2019-09/schema",
3-
"integer": {
4-
"type": "integer"
5-
},
6-
"refToInteger": {
7-
"$ref": "#/integer"
3+
"$defs": {
4+
"integer": {
5+
"type": "integer"
6+
},
7+
"refToInteger": {
8+
"$ref": "#/$defs/integer"
9+
}
810
}
911
}

json/remotes/draft2020-12/subSchemas-defs.json

-11
This file was deleted.
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"integer": {
4-
"type": "integer"
5-
},
6-
"refToInteger": {
7-
"$ref": "#/integer"
3+
"$defs": {
4+
"integer": {
5+
"type": "integer"
6+
},
7+
"refToInteger": {
8+
"$ref": "#/$defs/integer"
9+
}
810
}
911
}

json/remotes/subSchemas-defs.json

-10
This file was deleted.

json/remotes/subSchemas.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2-
"integer": {
3-
"type": "integer"
4-
},
5-
"refToInteger": {
6-
"$ref": "#/integer"
2+
"definitions": {
3+
"integer": {
4+
"type": "integer"
5+
},
6+
"refToInteger": {
7+
"$ref": "#/definitions/integer"
8+
}
79
}
810
}

json/tests/draft-next/items.json

+20
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,26 @@
265265
}
266266
]
267267
},
268+
{
269+
"description": "items with heterogeneous array",
270+
"schema": {
271+
"$schema": "https://json-schema.org/draft/next/schema",
272+
"prefixItems": [{}],
273+
"items": false
274+
},
275+
"tests": [
276+
{
277+
"description": "heterogeneous invalid instance",
278+
"data": [ "foo", "bar", 37 ],
279+
"valid": false
280+
},
281+
{
282+
"description": "valid instance",
283+
"data": [ null ],
284+
"valid": true
285+
}
286+
]
287+
},
268288
{
269289
"description": "items with null instance elements",
270290
"schema": {

json/tests/draft-next/optional/refOfUnknownKeyword.json

+23
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,28 @@
4242
"valid": false
4343
}
4444
]
45+
},
46+
{
47+
"description": "reference internals of known non-applicator",
48+
"schema": {
49+
"$schema": "https://json-schema.org/draft/next/schema",
50+
"$id": "/base",
51+
"examples": [
52+
{ "type": "string" }
53+
],
54+
"$ref": "#/examples/0"
55+
},
56+
"tests": [
57+
{
58+
"description": "match",
59+
"data": "a string",
60+
"valid": true
61+
},
62+
{
63+
"description": "mismatch",
64+
"data": 42,
65+
"valid": false
66+
}
67+
]
4568
}
4669
]

json/tests/draft-next/refRemote.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"description": "fragment within remote ref",
2323
"schema": {
2424
"$schema": "https://json-schema.org/draft/next/schema",
25-
"$ref": "http://localhost:1234/draft-next/subSchemas-defs.json#/$defs/integer"
25+
"$ref": "http://localhost:1234/draft-next/subSchemas.json#/$defs/integer"
2626
},
2727
"tests": [
2828
{
@@ -60,7 +60,7 @@
6060
"description": "ref within remote ref",
6161
"schema": {
6262
"$schema": "https://json-schema.org/draft/next/schema",
63-
"$ref": "http://localhost:1234/draft-next/subSchemas-defs.json#/$defs/refToInteger"
63+
"$ref": "http://localhost:1234/draft-next/subSchemas.json#/$defs/refToInteger"
6464
},
6565
"tests": [
6666
{

json/tests/draft2019-09/additionalItems.json

+20
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,26 @@
182182
}
183183
]
184184
},
185+
{
186+
"description": "additionalItems with heterogeneous array",
187+
"schema": {
188+
"$schema": "https://json-schema.org/draft/2019-09/schema",
189+
"items": [{}],
190+
"additionalItems": false
191+
},
192+
"tests": [
193+
{
194+
"description": "heterogeneous invalid instance",
195+
"data": [ "foo", "bar", 37 ],
196+
"valid": false
197+
},
198+
{
199+
"description": "valid instance",
200+
"data": [ null ],
201+
"valid": true
202+
}
203+
]
204+
},
185205
{
186206
"description": "additionalItems with null instance elements",
187207
"schema": {

json/tests/draft2019-09/optional/refOfUnknownKeyword.json

+23
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,28 @@
4242
"valid": false
4343
}
4444
]
45+
},
46+
{
47+
"description": "reference internals of known non-applicator",
48+
"schema": {
49+
"$schema": "https://json-schema.org/draft/2019-09/schema",
50+
"$id": "/base",
51+
"examples": [
52+
{ "type": "string" }
53+
],
54+
"$ref": "#/examples/0"
55+
},
56+
"tests": [
57+
{
58+
"description": "match",
59+
"data": "a string",
60+
"valid": true
61+
},
62+
{
63+
"description": "mismatch",
64+
"data": 42,
65+
"valid": false
66+
}
67+
]
4568
}
4669
]

json/tests/draft2019-09/refRemote.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"description": "fragment within remote ref",
2323
"schema": {
2424
"$schema": "https://json-schema.org/draft/2019-09/schema",
25-
"$ref": "http://localhost:1234/draft2019-09/subSchemas-defs.json#/$defs/integer"
25+
"$ref": "http://localhost:1234/draft2019-09/subSchemas.json#/$defs/integer"
2626
},
2727
"tests": [
2828
{
@@ -60,7 +60,7 @@
6060
"description": "ref within remote ref",
6161
"schema": {
6262
"$schema": "https://json-schema.org/draft/2019-09/schema",
63-
"$ref": "http://localhost:1234/draft2019-09/subSchemas-defs.json#/$defs/refToInteger"
63+
"$ref": "http://localhost:1234/draft2019-09/subSchemas.json#/$defs/refToInteger"
6464
},
6565
"tests": [
6666
{

json/tests/draft2020-12/items.json

+20
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,26 @@
265265
}
266266
]
267267
},
268+
{
269+
"description": "items with heterogeneous array",
270+
"schema": {
271+
"$schema": "https://json-schema.org/draft/2020-12/schema",
272+
"prefixItems": [{}],
273+
"items": false
274+
},
275+
"tests": [
276+
{
277+
"description": "heterogeneous invalid instance",
278+
"data": [ "foo", "bar", 37 ],
279+
"valid": false
280+
},
281+
{
282+
"description": "valid instance",
283+
"data": [ null ],
284+
"valid": true
285+
}
286+
]
287+
},
268288
{
269289
"description": "items with null instance elements",
270290
"schema": {

json/tests/draft2020-12/optional/refOfUnknownKeyword.json

+23
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,28 @@
4242
"valid": false
4343
}
4444
]
45+
},
46+
{
47+
"description": "reference internals of known non-applicator",
48+
"schema": {
49+
"$schema": "https://json-schema.org/draft/2020-12/schema",
50+
"$id": "/base",
51+
"examples": [
52+
{ "type": "string" }
53+
],
54+
"$ref": "#/examples/0"
55+
},
56+
"tests": [
57+
{
58+
"description": "match",
59+
"data": "a string",
60+
"valid": true
61+
},
62+
{
63+
"description": "mismatch",
64+
"data": 42,
65+
"valid": false
66+
}
67+
]
4568
}
4669
]

0 commit comments

Comments
 (0)