Skip to content

Commit 599d391

Browse files
authored
Merge branch 'master' into fixes/821
2 parents 23919c1 + 78413ee commit 599d391

10 files changed

+357
-268
lines changed

hyper-schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/core": true,
66
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
7+
"https://json-schema.org/draft/2019-09/vocab/unevaluated": true,
78
"https://json-schema.org/draft/2019-09/vocab/validation": true,
89
"https://json-schema.org/draft/2019-09/vocab/meta-data": true,
910
"https://json-schema.org/draft/2019-09/vocab/format": false,

jsonschema-core.xml

+275-212
Large diffs are not rendered by default.

jsonschema-hyperschema.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
<section title="Meta-Schemas and Output Schema">
283283
<t>
284284
The current URI for the JSON Hyper-Schema meta-schema is
285-
<eref target="https://json-schema.org/draft/2019-09/hyper-schema#"/>.
285+
<eref target="https://json-schema.org/draft/2019-09/hyper-schema"/>.
286286
</t>
287287
<t>
288288
The current URI for this vocabulary, known as the Hyper-Schema vocabulary, is:
@@ -299,7 +299,7 @@
299299
Schema, and use of this format can be declared by referencing the normative
300300
link description schema as the schema for the data structure that uses the links.
301301
The URI of the normative link description schema is:
302-
<eref target="https://json-schema.org/draft/2019-09/links#"/>.
302+
<eref target="https://json-schema.org/draft/2019-09/links"/>.
303303
</t>
304304
<t>
305305
JSON Hyper-Schema implementations are free to provide output in any format.
@@ -310,7 +310,7 @@
310310
It is RECOMMENDED that implementations be capable of producing output
311311
in this format to facilitated testing. The URI of the JSON Schema
312312
describing the recommended output format is
313-
<eref target="https://json-schema.org/draft/2019-09/output/hyper-schema#"/>.
313+
<eref target="https://json-schema.org/draft/2019-09/output/hyper-schema"/>.
314314
</t>
315315
<t>
316316
Updated vocabulary and meta-schema URIs MAY be published between

jsonschema-validation.xml

+11-10
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,10 @@
177177

178178
<section title="Meta-Schema" anchor="meta-schema">
179179
<t>
180-
The current URI for the default JSON Schema meta-schema is
181-
<eref target="http://json-schema.org/draft/2019-09/schema"/>.
182-
For schema author convenience, this meta-schema describes all vocabularies
180+
The current URI for the default JSON Schema dialect meta-schema is
181+
<eref target="https://json-schema.org/draft/2019-09/schema"/>.
182+
For schema author convenience, this meta-schema describes a dialect
183+
consisting of all vocabularies
183184
defined in this specification and the JSON Schema Core specification,
184185
as well as two former keywords which are reserved for a transitional period.
185186
Individual vocabulary and vocabulary meta-schema URIs are given for
@@ -732,7 +733,7 @@
732733
</t>
733734
<t>
734735
Implementations MAY support additional attributes using the other
735-
production names defined in that section. If "full-date" or "full-time"
736+
production names defined anywhere in that RFC. If "full-date" or "full-time"
736737
are implemented, the corresponding short form ("date" or "time"
737738
respectively) MUST be implemented, and MUST behave identically.
738739
Implementations SHOULD NOT define extension attributes
@@ -1083,7 +1084,7 @@
10831084
"contentSchema": {
10841085
"type": "array",
10851086
"minItems": 2,
1086-
"items": [
1087+
"prefixItems": [
10871088
{
10881089
"const": {
10891090
"typ": "JWT",
@@ -1177,10 +1178,10 @@
11771178
the entire resource being described MAY be removed in the future.
11781179
</t>
11791180
<t>
1180-
When the "deprecated" keyword is applied to an item in an array by means of
1181-
"items", if "items" is a single schema, the deprecation relates to the whole
1182-
array, while if "items" is an array of schemas, the deprecation relates to
1183-
the corresponding item according to the subschemas position.
1181+
The "deprecated" keyword applies to each instance location to which the
1182+
schema object containing the keyword successfully applies. This can
1183+
result in scenarios where every array item or object property
1184+
is deprecated even though the containing array or object is not.
11841185
</t>
11851186
<t>
11861187
Omitting this keyword has the same behavior as a value of false.
@@ -1201,7 +1202,7 @@
12011202
expected to be ignored or rejected by that owning authority.
12021203
</t>
12031204
<t>
1204-
An instance document that is marked as "readOnly for the entire document
1205+
An instance document that is marked as "readOnly" for the entire document
12051206
MAY be ignored if sent to the owning authority, or MAY result in an
12061207
error, at the authority's discretion.
12071208
</t>

meta/applicator.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
"$dynamicAnchor": "meta",
88

99
"title": "Applicator vocabulary meta-schema",
10+
"type": ["object", "boolean"],
1011
"properties": {
1112
"prefixItems": { "$ref": "#/$defs/schemaArray" },
1213
"items": { "$dynamicRef": "#meta" },
13-
"unevaluatedItems": { "$dynamicRef": "#meta" },
1414
"contains": { "$dynamicRef": "#meta" },
1515
"additionalProperties": { "$dynamicRef": "#meta" },
16-
"unevaluatedProperties": { "$dynamicRef": "#meta" },
1716
"properties": {
1817
"type": "object",
1918
"additionalProperties": { "$dynamicRef": "#meta" },

meta/core.json

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
},
3434
"$recursiveAnchor": {
3535
"type": "boolean",
36-
"const": true,
3736
"default": false
3837
},
3938
"$vocabulary": {

meta/unevaluated.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/unevaluated",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/unevaluated": true
6+
},
7+
"$dynamicAnchor": "meta",
8+
9+
"title": "Unevaluated applicator vocabulary meta-schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"unevaluatedItems": { "$dynamicRef": "#meta" },
13+
"unevaluatedProperties": { "$dynamicRef": "#meta" }
14+
}
15+
}

output/schema.json

+14-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"$id": "https://json-schema.org/draft/2019-09/output/schema",
44
"description": "A schema that validates the minimum requirements for validation output",
55

6-
"oneOf": [
6+
"anyOf": [
77
{ "$ref": "#/$defs/flag" },
88
{ "$ref": "#/$defs/basic" },
99
{ "$ref": "#/$defs/detailed" },
@@ -15,15 +15,18 @@
1515
"valid": { "type": "boolean" },
1616
"keywordLocation": {
1717
"type": "string",
18-
"format": "uri-reference"
18+
"format": "json-pointer"
1919
},
2020
"absoluteKeywordLocation": {
2121
"type": "string",
2222
"format": "uri"
2323
},
2424
"instanceLocation": {
2525
"type": "string",
26-
"format": "uri-reference"
26+
"format": "json-pointer"
27+
},
28+
"error": {
29+
"type": "string"
2730
},
2831
"errors": {
2932
"$ref": "#/$defs/outputUnitArray"
@@ -41,7 +44,14 @@
4144
}
4245
},
4346
"then": {
44-
"required": [ "errors" ]
47+
"anyOf": [
48+
{
49+
"required": [ "error" ]
50+
},
51+
{
52+
"required": [ "errors" ]
53+
}
54+
]
4555
}
4656
},
4757
{

output/verbose-example.json

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,117 @@
11
{
22
"valid": false,
3-
"keywordLocation": "#",
4-
"instanceLocation": "#",
3+
"keywordLocation": "",
4+
"instanceLocation": "",
55
"errors": [
66
{
77
"valid": true,
8-
"keywordLocation": "#/$defs",
9-
"instanceLocation": "#"
8+
"keywordLocation": "/$defs",
9+
"instanceLocation": ""
1010
},
1111
{
1212
"valid": true,
13-
"keywordLocation": "#/type",
14-
"instanceLocation": "#"
13+
"keywordLocation": "/type",
14+
"instanceLocation": ""
1515
},
1616
{
1717
"valid": false,
18-
"keywordLocation": "#/items",
19-
"instanceLocation": "#",
18+
"keywordLocation": "/items",
19+
"instanceLocation": "",
2020
"errors": [
2121
{
2222
"valid": true,
23-
"keywordLocation": "#/items/$ref",
23+
"keywordLocation": "/items/$ref",
2424
"absoluteKeywordLocation":
2525
"https://example.com/polygon#/items/$ref",
26-
"instanceLocation": "#/0",
26+
"instanceLocation": "/0",
2727
"annotations": [
2828
{
2929
"valid": true,
30-
"keywordLocation": "#/items/$ref",
30+
"keywordLocation": "/items/$ref",
3131
"absoluteKeywordLocation":
3232
"https://example.com/polygon#/$defs/point",
33-
"instanceLocation": "#/0",
33+
"instanceLocation": "/0",
3434
"annotations": [
3535
{
3636
"valid": true,
37-
"keywordLocation": "#/items/$ref/type",
37+
"keywordLocation": "/items/$ref/type",
3838
"absoluteKeywordLocation":
3939
"https://example.com/polygon#/$defs/point/type",
40-
"instanceLocation": "#/0"
40+
"instanceLocation": "/0"
4141
},
4242
{
4343
"valid": true,
44-
"keywordLocation": "#/items/$ref/properties",
44+
"keywordLocation": "/items/$ref/properties",
4545
"absoluteKeywordLocation":
4646
"https://example.com/polygon#/$defs/point/properties",
47-
"instanceLocation": "#/0"
47+
"instanceLocation": "/0"
4848
},
4949
{
5050
"valid": true,
51-
"keywordLocation": "#/items/$ref/required",
51+
"keywordLocation": "/items/$ref/required",
5252
"absoluteKeywordLocation":
5353
"https://example.com/polygon#/$defs/point/required",
54-
"instanceLocation": "#/0"
54+
"instanceLocation": "/0"
5555
},
5656
{
5757
"valid": true,
58-
"keywordLocation": "#/items/$ref/additionalProperties",
58+
"keywordLocation": "/items/$ref/additionalProperties",
5959
"absoluteKeywordLocation":
6060
"https://example.com/polygon#/$defs/point/additionalProperties",
61-
"instanceLocation": "#/0"
61+
"instanceLocation": "/0"
6262
}
6363
]
6464
}
6565
]
6666
},
6767
{
6868
"valid": false,
69-
"keywordLocation": "#/items/$ref",
69+
"keywordLocation": "/items/$ref",
7070
"absoluteKeywordLocation":
7171
"https://example.com/polygon#/items/$ref",
72-
"instanceLocation": "#/1",
72+
"instanceLocation": "/1",
7373
"errors": [
7474
{
7575
"valid": false,
76-
"keywordLocation": "#/items/$ref",
76+
"keywordLocation": "/items/$ref",
7777
"absoluteKeywordLocation":
7878
"https://example.com/polygon#/$defs/point",
79-
"instanceLocation": "#/1",
79+
"instanceLocation": "/1",
8080
"errors": [
8181
{
8282
"valid": true,
83-
"keywordLocation": "#/items/$ref/type",
83+
"keywordLocation": "/items/$ref/type",
8484
"absoluteKeywordLocation":
8585
"https://example.com/polygon#/$defs/point/type",
86-
"instanceLocation": "#/1"
86+
"instanceLocation": "/1"
8787
},
8888
{
8989
"valid": true,
90-
"keywordLocation": "#/items/$ref/properties",
90+
"keywordLocation": "/items/$ref/properties",
9191
"absoluteKeywordLocation":
9292
"https://example.com/polygon#/$defs/point/properties",
93-
"instanceLocation": "#/1"
93+
"instanceLocation": "/1"
9494
},
9595
{
9696
"valid": false,
97-
"keywordLocation": "#/items/$ref/required",
97+
"keywordLocation": "/items/$ref/required",
9898
"absoluteKeywordLocation":
9999
"https://example.com/polygon#/$defs/point/required",
100-
"instanceLocation": "#/1"
100+
"instanceLocation": "/1"
101101
},
102102
{
103103
"valid": false,
104-
"keywordLocation": "#/items/$ref/additionalProperties",
104+
"keywordLocation": "/items/$ref/additionalProperties",
105105
"absoluteKeywordLocation":
106106
"https://example.com/polygon#/$defs/point/additionalProperties",
107-
"instanceLocation": "#/1",
107+
"instanceLocation": "/1",
108108
"errors": [
109109
{
110110
"valid": false,
111-
"keywordLocation": "#/items/$ref/additionalProperties",
111+
"keywordLocation": "/items/$ref/additionalProperties",
112112
"absoluteKeywordLocation":
113113
"https://example.com/polygon#/$defs/point/additionalProperties",
114-
"instanceLocation": "#/1/z"
114+
"instanceLocation": "/1/z"
115115
}
116116
]
117117
}
@@ -123,8 +123,8 @@
123123
},
124124
{
125125
"valid": false,
126-
"keywordLocation": "#/minItems",
127-
"instanceLocation": "#"
126+
"keywordLocation": "/minItems",
127+
"instanceLocation": ""
128128
}
129129
]
130130
}

schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"$vocabulary": {
55
"https://json-schema.org/draft/2019-09/vocab/core": true,
66
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
7+
"https://json-schema.org/draft/2019-09/vocab/unevaluated": true,
78
"https://json-schema.org/draft/2019-09/vocab/validation": true,
89
"https://json-schema.org/draft/2019-09/vocab/meta-data": true,
910
"https://json-schema.org/draft/2019-09/vocab/format": false,

0 commit comments

Comments
 (0)