Skip to content

Commit 3d14d92

Browse files
committed
Identify vocabularies, update meta-schemas
Includes verbiage on the likelihood of updated meta-schemas with later dates. The hyper-schema output format has not yet been updated to conform to the recent annotion/error output work.
1 parent f80d1fd commit 3d14d92

16 files changed

+380
-226
lines changed

hyper-schema.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
3-
"$id": "http://json-schema.org/draft-08/hyper-schema",
2+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
3+
"$id": "http://json-schema.org/draft/2019-03/hyper-schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019/03/vocab/core": true,
6+
"https://json-schema.org/draft/2019/03/vocab/applicator": true,
7+
"https://json-schema.org/draft/2019/03/vocab/validation": true,
8+
"https://json-schema.org/draft/2019/03/vocab/meta-data": true,
9+
"https://json-schema.org/draft/2019/03/vocab/format": true,
10+
"https://json-schema.org/draft/2019/03/vocab/content": true,
11+
"https://json-schema.org/draft/2019/03/vocab/hyper-schema": true
12+
},
413
"$recursiveAnchor": true,
514

615
"title": "JSON Hyper-Schema",
7-
"$ref": "http://json-schema.org/draft-08/schema",
8-
"properties": {
9-
"base": {
10-
"type": "string",
11-
"format": "uri-template"
12-
},
13-
"links": {
14-
"type": "array",
15-
"items": {
16-
"$ref": "http://json-schema.org/draft-08/links"
17-
}
18-
}
19-
},
16+
"allOf": [
17+
{"$ref": "http://json-schema.org/draft/2019-03/schema"},
18+
{"$ref": "http://json-schema.org/draft/2019-03/meta/hyper-schema"}
19+
],
2020
"links": [
2121
{
2222
"rel": "self",

jsonschema-core.xml

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,11 +1058,18 @@
10581058
</t>
10591059
<t>
10601060
The current URI for the Core vocabulary is:
1061-
<eref target="https://json-schema.org/draft-08/vocabularies/core"/>.
1061+
<eref target="https://json-schema.org/draft/2019-03/vocab/core"/>.
10621062
</t>
10631063
<t>
10641064
The current URI for the corresponding meta-schema is:
1065-
<eref target="https://json-schema.org/draft-08/core"/>.
1065+
<eref target="https://json-schema.org/draft/2019/03/meta/core"/>.
1066+
</t>
1067+
<t>
1068+
Updated vocabulary and meta-schema URIs MAY be published between
1069+
specification drafts in order to correct errors. Implementations
1070+
SHOULD consider URIs dated after this specification draft and
1071+
before the next to indicate the same syntax and semantics
1072+
as those listed here.
10661073
</t>
10671074
</section>
10681075
<section title="Example Meta-Schema With Vocabulary Declarations"
@@ -1081,16 +1088,16 @@
10811088
<artwork>
10821089
<![CDATA[
10831090
{
1084-
"$schema": "https://json-schema.org/draft-08/core-app-example#",
1085-
"$id": "https://json-schema.org/draft-08/core-app-example",
1091+
"$schema": "https://json-schema.org/draft/2019-03/core-app-example#",
1092+
"$id": "https://json-schema.org/draft/2019-03/core-app-example",
10861093
"$recursiveAnchor": true,
10871094
"$vocabulary": {
1088-
"https://json-schema.org/draft-08/vocabularies/core": true,
1089-
"https://json-schema.org/draft-08/vocabularies/applicator": true
1095+
"https://json-schema.org/draft/2019-03/vocab/core": true,
1096+
"https://json-schema.org/draft/2019-03/vocab/applicator": true
10901097
},
10911098
"allOf": [
1092-
{"$ref": "https://json-schema.org/draft-08/core"},
1093-
{"$ref": "https://json-schema.org/draft-08/applicator"}
1099+
{"$ref": "https://json-schema.org/draft/2019-03/meta/core"},
1100+
{"$ref": "https://json-schema.org/draft/2019-03/meta/applicator"}
10941101
],
10951102
"patternProperties": {
10961103
"^unevaluated.*$": false
@@ -1352,7 +1359,7 @@
13521359
<artwork>
13531360
<![CDATA[
13541361
{
1355-
"$schema": "http://json-schema.org/draft-08/schema#",
1362+
"$schema": "http://json-schema.org/draft/2019-03/schema#",
13561363
"$id": "https://example.com/original",
13571364
13581365
"properties": {
@@ -1366,7 +1373,7 @@
13661373
}
13671374
13681375
{
1369-
"$schema": "http://json-schema.org/draft-08/schema#",
1376+
"$schema": "http://json-schema.org/draft/2019-03/schema#",
13701377
"$id": "https://example.com/extension",
13711378
13721379
"$ref": "original",
@@ -1465,7 +1472,7 @@
14651472
<artwork>
14661473
<![CDATA[
14671474
{
1468-
"$schema": "http://json-schema.org/draft-08/schema#",
1475+
"$schema": "http://json-schema.org/draft/2019-03/schema#",
14691476
"$id": "https://example.com/original",
14701477
"$recursiveAnchor": true,
14711478
@@ -1480,7 +1487,7 @@
14801487
}
14811488
14821489
{
1483-
"$schema": "http://json-schema.org/draft-08/schema#",
1490+
"$schema": "http://json-schema.org/draft/2019-03/schema#",
14841491
"$id": "https://example.com/extension",
14851492
"$recursiveAnchor": true,
14861493
@@ -1881,17 +1888,24 @@
18811888
This section defines a vocabulary of applicator keywords that
18821889
are RECOMMENDED for use as the basis of other vocabularies.
18831890
</t>
1891+
<t>
1892+
Meta-schemas that do not use "$vocabulary" SHOULD be considered to
1893+
require this vocabulary as if its URI were present with a value of true.
1894+
</t>
18841895
<t>
18851896
The current URI for this vocabulary, known as the Applicator vocabulary, is:
1886-
<eref target="https://json-schema.org/draft-08/vocabularies/applicator"/>.
1897+
<eref target="https://json-schema.org/draft/2019-03/vocab/applicator"/>.
18871898
</t>
18881899
<t>
18891900
The current URI for the corresponding meta-schema is:
1890-
<eref target="https://json-schema.org/draft-08/applicator"/>.
1901+
<eref target="https://json-schema.org/draft/2019-03/meta/applicator"/>.
18911902
</t>
18921903
<t>
1893-
Meta-schemas that do not use "$vocabulary" SHOULD be considered to
1894-
require this vocabulary as if its URI were present with a value of true.
1904+
Updated vocabulary and meta-schema URIs MAY be published between
1905+
specification drafts in order to correct errors. Implementations
1906+
SHOULD consider URIs dated after this specification draft and
1907+
before the next to indicate the same syntax and semantics
1908+
as those listed here.
18951909
</t>
18961910
<section title="Keyword Independence">
18971911
<t>
@@ -2479,7 +2493,7 @@
24792493
<figure>
24802494
<artwork>
24812495
<![CDATA[
2482-
http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
2496+
http://json-schema.org/draft/2019-03/schema#/$defs/nonNegativeInteger/minimum
24832497
]]>
24842498
</artwork>
24852499
</figure>
@@ -2555,7 +2569,7 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
25552569
<![CDATA[
25562570
{
25572571
"$id": "http://example.com/polygon#",
2558-
"$schema": "http://json-schema.org/draft-08/schema#",
2572+
"$schema": "http://json-schema.org/draft/2019-03/schema#",
25592573
"$defs": {
25602574
"point": {
25612575
"type": "object",
@@ -2766,16 +2780,16 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
27662780
</t>
27672781
<t>
27682782
Because this output structure can be quite large, a smaller example is given
2769-
here for brevity. The full output structure of the example above can be found
2770-
<eref target="standardized-output-verbose.json">here</eref>.
2783+
here for brevity. The URI of the full output structure of the example above is:
2784+
<eref target="https://json-schema.org/draft/2019-03/output/verbose-example"/>.
27712785
</t>
27722786
<figure>
27732787
<artwork>
27742788
<![CDATA[
27752789
// schema
27762790
{
27772791
"$id": "http://example.com/polygon#",
2778-
"$schema": "http://json-schema.org/draft-08/schema#",
2792+
"$schema": "http://json-schema.org/draft/2019-03/schema#",
27792793
"type": "object",
27802794
"properties": {
27812795
"validProp": true,
@@ -2825,10 +2839,11 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
28252839
</figure>
28262840
</section>
28272841

2828-
<section title="Output validation schema">
2842+
<section title="Output validation schemas">
28292843
<t>
2830-
For convenience, a JSON Schema has been provided to validate output generated
2831-
by implementations. It can be found <eref target="schema-output.json">here</eref>.
2844+
For convenience, JSON Schema has been provided to validate output generated
2845+
by implementations. Its URI is:
2846+
<eref target="https://json-schema.org/draft/2019-03/output/schema"/>.
28322847
</t>
28332848
</section>
28342849

jsonschema-hyperschema.xml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,24 @@
288288
<section title="Meta-Schemas and Output Schema">
289289
<t>
290290
The current URI for the JSON Hyper-Schema meta-schema is
291-
<eref target="http://json-schema.org/draft-08/hyper-schema#"/>.
291+
<eref target="http://json-schema.org/draft/2019-03/hyper-schema#"/>.
292+
</t>
293+
<t>
294+
The current URI for this vocabulary, known as the Hyper-Schema vocabulary, is:
295+
<eref target="https://json-schema.org/draft/2019-03/vocab/hyper-schema"/>.
296+
</t>
297+
<t>
298+
The current URI for the corresponding meta-schema, which differs from the
299+
convenience meta-schema above in that it describes only the hyper-schema
300+
keywords ("base" and "link") is:
301+
<eref target="https://json-schema.org/draft/2019-03/meta/hyper-schema"/>.
292302
</t>
293303
<t>
294304
The <xref target="ldo">link description format</xref> can be used without JSON
295305
Schema, and use of this format can be declared by referencing the normative
296306
link description schema as the schema for the data structure that uses the links.
297307
The URI of the normative link description schema is:
298-
<eref target="http://json-schema.org/draft-08/links#"/>.
308+
<eref target="http://json-schema.org/draft/2019-03/links#"/>.
299309
</t>
300310
<t>
301311
JSON Hyper-Schema implementations are free to provide output in any format.
@@ -306,7 +316,14 @@
306316
It is RECOMMENDED that implementations be capable of producing output
307317
in this format to facilitated testing. The URI of the JSON Schema
308318
describing the recommended output format is
309-
<eref target="http://json-schema.org/draft-08/hyper-schema-output#"/>.
319+
<eref target="http://json-schema.org/draft/2019-03/output/hyper-schema#"/>.
320+
</t>
321+
<t>
322+
Updated vocabulary and meta-schema URIs MAY be published between
323+
specification drafts in order to correct errors. Implementations
324+
SHOULD consider URIs dated after this specification draft and
325+
before the next to indicate the same syntax and semantics
326+
as those listed here.
310327
</t>
311328
</section>
312329
<section title="Schema Keywords">
@@ -1607,7 +1624,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
16071624
<![CDATA[
16081625
{
16091626
"$id": "https://schema.example.com/entry",
1610-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
1627+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
16111628
"base": "https://example.com/api/",
16121629
"links": [
16131630
{
@@ -1681,7 +1698,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
16811698
<artwork>
16821699
<![CDATA[{
16831700
"$id": "https://schema.example.com/thing",
1684-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
1701+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
16851702
"base": "https://example.com/api/",
16861703
"type": "object",
16871704
"required": ["data"],
@@ -1797,7 +1814,7 @@ Link: <https://schema.example.com/entry>; rel="describedBy"
17971814
<artwork>
17981815
<![CDATA[{
17991816
"$id": "https://schema.example.com/interesting-stuff",
1800-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
1817+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
18011818
"required": ["stuffWorthEmailingAbout", "email", "title"],
18021819
"properties": {
18031820
"title": {
@@ -1984,7 +2001,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
19842001
<artwork>
19852002
<![CDATA[{
19862003
"$id": "https://schema.example.com/tree-node",
1987-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
2004+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
19882005
"base": "trees/{treeId}/",
19892006
"properties": {
19902007
"id": {"type": "integer"},
@@ -2046,7 +2063,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
20462063
<artwork>
20472064
<![CDATA[{
20482065
"$id": "https://schema.example.com/thing",
2049-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
2066+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
20502067
"base": "https://example.com/api/",
20512068
"type": "object",
20522069
"required": ["data"],
@@ -2099,7 +2116,7 @@ Link: <https://example.com/api/trees/1/nodes/456>; rev="up"
20992116
<artwork>
21002117
<![CDATA[{
21012118
"$id": "https://schema.example.com/thing-collection",
2102-
"$schema": "http://json-schema.org/draft-08/hyper-schema#",
2119+
"$schema": "http://json-schema.org/draft/2019-03/hyper-schema#",
21032120
"base": "https://example.com/api/",
21042121
"type": "object",
21052122
"required": ["elements"],

0 commit comments

Comments
 (0)