-
-
Notifications
You must be signed in to change notification settings - Fork 321
Identify vocabularies, update meta-schemas #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1058,11 +1058,18 @@ | |
</t> | ||
<t> | ||
The current URI for the Core vocabulary is: | ||
<eref target="https://json-schema.org/draft-08/vocabularies/core"/>. | ||
<eref target="https://json-schema.org/draft/2019-03/vocab/core"/>. | ||
</t> | ||
<t> | ||
The current URI for the corresponding meta-schema is: | ||
<eref target="https://json-schema.org/draft-08/core"/>. | ||
<eref target="https://json-schema.org/draft/2019/03/meta/core"/>. | ||
Relequestual marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</t> | ||
<t> | ||
Updated vocabulary and meta-schema URIs MAY be published between | ||
specification drafts in order to correct errors. Implementations | ||
SHOULD consider URIs dated after this specification draft and | ||
before the next to indicate the same syntax and semantics | ||
as those listed here. | ||
</t> | ||
</section> | ||
<section title="Example Meta-Schema With Vocabulary Declarations" | ||
|
@@ -1081,16 +1088,16 @@ | |
<artwork> | ||
<![CDATA[ | ||
{ | ||
"$schema": "https://json-schema.org/draft-08/core-app-example#", | ||
"$id": "https://json-schema.org/draft-08/core-app-example", | ||
"$schema": "https://json-schema.org/draft/2019-03/core-app-example#", | ||
"$id": "https://json-schema.org/draft/2019-03/core-app-example", | ||
"$recursiveAnchor": true, | ||
"$vocabulary": { | ||
"https://json-schema.org/draft-08/vocabularies/core": true, | ||
"https://json-schema.org/draft-08/vocabularies/applicator": true | ||
"https://json-schema.org/draft/2019-03/vocab/core": true, | ||
"https://json-schema.org/draft/2019-03/vocab/applicator": true | ||
}, | ||
"allOf": [ | ||
{"$ref": "https://json-schema.org/draft-08/core"}, | ||
{"$ref": "https://json-schema.org/draft-08/applicator"} | ||
{"$ref": "https://json-schema.org/draft/2019-03/meta/core"}, | ||
{"$ref": "https://json-schema.org/draft/2019-03/meta/applicator"} | ||
], | ||
"patternProperties": { | ||
"^unevaluated.*$": false | ||
|
@@ -1352,7 +1359,7 @@ | |
<artwork> | ||
<![CDATA[ | ||
{ | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$schema": "http://json-schema.org/draft/2019-03/schema#", | ||
"$id": "https://example.com/original", | ||
|
||
"properties": { | ||
|
@@ -1366,7 +1373,7 @@ | |
} | ||
|
||
{ | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$schema": "http://json-schema.org/draft/2019-03/schema#", | ||
"$id": "https://example.com/extension", | ||
|
||
"$ref": "original", | ||
|
@@ -1465,7 +1472,7 @@ | |
<artwork> | ||
<![CDATA[ | ||
{ | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$schema": "http://json-schema.org/draft/2019-03/schema#", | ||
"$id": "https://example.com/original", | ||
"$recursiveAnchor": true, | ||
|
||
|
@@ -1480,7 +1487,7 @@ | |
} | ||
|
||
{ | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$schema": "http://json-schema.org/draft/2019-03/schema#", | ||
"$id": "https://example.com/extension", | ||
"$recursiveAnchor": true, | ||
|
||
|
@@ -1881,17 +1888,24 @@ | |
This section defines a vocabulary of applicator keywords that | ||
are RECOMMENDED for use as the basis of other vocabularies. | ||
</t> | ||
<t> | ||
Meta-schemas that do not use "$vocabulary" SHOULD be considered to | ||
require this vocabulary as if its URI were present with a value of true. | ||
</t> | ||
<t> | ||
The current URI for this vocabulary, known as the Applicator vocabulary, is: | ||
<eref target="https://json-schema.org/draft-08/vocabularies/applicator"/>. | ||
<eref target="https://json-schema.org/draft/2019-03/vocab/applicator"/>. | ||
</t> | ||
<t> | ||
The current URI for the corresponding meta-schema is: | ||
<eref target="https://json-schema.org/draft-08/applicator"/>. | ||
<eref target="https://json-schema.org/draft/2019-03/meta/applicator"/>. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe not in this PR, but should we have language identifying this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly- definitely not in this PR but it's an interesting idea. Might be better in a best practices section on the site or understanding JSON Schema? Not sure- feel free to file it as an issue on the spec repo if you want. |
||
</t> | ||
<t> | ||
Meta-schemas that do not use "$vocabulary" SHOULD be considered to | ||
require this vocabulary as if its URI were present with a value of true. | ||
Updated vocabulary and meta-schema URIs MAY be published between | ||
specification drafts in order to correct errors. Implementations | ||
SHOULD consider URIs dated after this specification draft and | ||
before the next to indicate the same syntax and semantics | ||
as those listed here. | ||
</t> | ||
<section title="Keyword Independence"> | ||
<t> | ||
|
@@ -2479,7 +2493,7 @@ | |
<figure> | ||
<artwork> | ||
<![CDATA[ | ||
http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum | ||
http://json-schema.org/draft/2019-03/schema#/$defs/nonNegativeInteger/minimum | ||
]]> | ||
</artwork> | ||
</figure> | ||
|
@@ -2555,7 +2569,7 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum | |
<![CDATA[ | ||
{ | ||
"$id": "http://example.com/polygon#", | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$schema": "http://json-schema.org/draft/2019-03/schema#", | ||
"$defs": { | ||
"point": { | ||
"type": "object", | ||
|
@@ -2766,16 +2780,16 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum | |
</t> | ||
<t> | ||
Because this output structure can be quite large, a smaller example is given | ||
here for brevity. The full output structure of the example above can be found | ||
<eref target="standardized-output-verbose.json">here</eref>. | ||
here for brevity. The URI of the full output structure of the example above is: | ||
<eref target="https://json-schema.org/draft/2019-03/output/verbose-example"/>. | ||
</t> | ||
<figure> | ||
<artwork> | ||
<![CDATA[ | ||
// schema | ||
{ | ||
"$id": "http://example.com/polygon#", | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$schema": "http://json-schema.org/draft/2019-03/schema#", | ||
"type": "object", | ||
"properties": { | ||
"validProp": true, | ||
|
@@ -2825,10 +2839,11 @@ http://json-schema.org/draft-08/schema#/$defs/nonNegativeInteger/minimum | |
</figure> | ||
</section> | ||
|
||
<section title="Output validation schema"> | ||
<section title="Output validation schemas"> | ||
<t> | ||
For convenience, a JSON Schema has been provided to validate output generated | ||
by implementations. It can be found <eref target="schema-output.json">here</eref>. | ||
For convenience, JSON Schema has been provided to validate output generated | ||
by implementations. Its URI is: | ||
<eref target="https://json-schema.org/draft/2019-03/output/schema"/>. | ||
</t> | ||
</section> | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.