Skip to content

Commit c5717a1

Browse files
authored
Merge pull request #714 from handrews/metaname
Identify vocabularies, update meta-schemas
2 parents 5093e5c + 4faa3c7 commit c5717a1

16 files changed

+397
-242
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-04/hyper-schema#",
3+
"$id": "http://json-schema.org/draft/2019-04/hyper-schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-04/vocab/core": true,
6+
"https://json-schema.org/draft/2019-04/vocab/applicator": true,
7+
"https://json-schema.org/draft/2019-04/vocab/validation": true,
8+
"https://json-schema.org/draft/2019-04/vocab/meta-data": true,
9+
"https://json-schema.org/draft/2019-04/vocab/format": true,
10+
"https://json-schema.org/draft/2019-04/vocab/content": true,
11+
"https://json-schema.org/draft/2019-04/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-04/schema"},
18+
{"$ref": "http://json-schema.org/draft/2019-04/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-04/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-04/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-04/core-app-example#",
1092+
"$id": "https://json-schema.org/draft/2019-04/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-04/vocab/core": true,
1096+
"https://json-schema.org/draft/2019-04/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-04/meta/core"},
1100+
{"$ref": "https://json-schema.org/draft/2019-04/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-04/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-04/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-04/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-04/schema#",
14841491
"$id": "https://example.com/extension",
14851492
"$recursiveAnchor": true,
14861493
@@ -1916,17 +1923,24 @@
19161923
This section defines a vocabulary of applicator keywords that
19171924
are RECOMMENDED for use as the basis of other vocabularies.
19181925
</t>
1926+
<t>
1927+
Meta-schemas that do not use "$vocabulary" SHOULD be considered to
1928+
require this vocabulary as if its URI were present with a value of true.
1929+
</t>
19191930
<t>
19201931
The current URI for this vocabulary, known as the Applicator vocabulary, is:
1921-
<eref target="https://json-schema.org/draft-08/vocabularies/applicator"/>.
1932+
<eref target="https://json-schema.org/draft/2019-04/vocab/applicator"/>.
19221933
</t>
19231934
<t>
19241935
The current URI for the corresponding meta-schema is:
1925-
<eref target="https://json-schema.org/draft-08/applicator"/>.
1936+
<eref target="https://json-schema.org/draft/2019-04/meta/applicator"/>.
19261937
</t>
19271938
<t>
1928-
Meta-schemas that do not use "$vocabulary" SHOULD be considered to
1929-
require this vocabulary as if its URI were present with a value of true.
1939+
Updated vocabulary and meta-schema URIs MAY be published between
1940+
specification drafts in order to correct errors. Implementations
1941+
SHOULD consider URIs dated after this specification draft and
1942+
before the next to indicate the same syntax and semantics
1943+
as those listed here.
19301944
</t>
19311945
<section title="Keyword Independence">
19321946
<t>
@@ -2514,7 +2528,7 @@
25142528
<figure>
25152529
<artwork>
25162530
<![CDATA[
2517-
http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
2531+
http://json-schema.org/draft/2019-04/schema#/$defs/nonNegativeInteger/minimum
25182532
]]>
25192533
</artwork>
25202534
</figure>
@@ -2590,7 +2604,7 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
25902604
<![CDATA[
25912605
{
25922606
"$id": "http://example.com/polygon#",
2593-
"$schema": "http://json-schema.org/draft-08/schema#",
2607+
"$schema": "http://json-schema.org/draft/2019-04/schema#",
25942608
"$defs": {
25952609
"point": {
25962610
"type": "object",
@@ -2801,16 +2815,16 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
28012815
</t>
28022816
<t>
28032817
Because this output structure can be quite large, a smaller example is given
2804-
here for brevity. The full output structure of the example above can be found
2805-
<eref target="standardized-output-verbose.json">here</eref>.
2818+
here for brevity. The URI of the full output structure of the example above is:
2819+
<eref target="https://json-schema.org/draft/2019-04/output/verbose-example"/>.
28062820
</t>
28072821
<figure>
28082822
<artwork>
28092823
<![CDATA[
28102824
// schema
28112825
{
28122826
"$id": "http://example.com/polygon#",
2813-
"$schema": "http://json-schema.org/draft-08/schema#",
2827+
"$schema": "http://json-schema.org/draft/2019-04/schema#",
28142828
"type": "object",
28152829
"properties": {
28162830
"validProp": true,
@@ -2860,10 +2874,11 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum
28602874
</figure>
28612875
</section>
28622876

2863-
<section title="Output validation schema">
2877+
<section title="Output validation schemas">
28642878
<t>
2865-
For convenience, a JSON Schema has been provided to validate output generated
2866-
by implementations. It can be found <eref target="schema-output.json">here</eref>.
2879+
For convenience, JSON Schema has been provided to validate output generated
2880+
by implementations. Its URI is:
2881+
<eref target="https://json-schema.org/draft/2019-04/output/schema"/>.
28672882
</t>
28682883
</section>
28692884

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-04/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-04/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-04/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-04/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-04/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-04/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-04/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-04/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-04/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-04/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-04/hyper-schema#",
21032120
"base": "https://example.com/api/",
21042121
"type": "object",
21052122
"required": ["elements"],

0 commit comments

Comments
 (0)