Skip to content
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

format as a annotation by default - separate vocabs (option 3) #1027

Merged
merged 5 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -540,20 +540,19 @@

<t>
The current URI for this vocabulary, known as the Format-Annotation vocabulary, is:
&lt;https://json-schema.org/draft/2020-11/vocab/format-annotation&gt;. This vocabulary
is required by this specification.
&lt;https://json-schema.org/draft/2020-11/vocab/format-annotation&gt;. The current
URI for the corresponding meta-schema is:
<eref target="https://json-schema.org/draft/2020-11/meta/format-annotation"/>.
Implementing support for this vocabulary is REQUIRED.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested change (using the proper IETF language):

  •                Implementations MUST support this vocabulary.
    

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUIRED is proper language. RFC 2119 section 1.

</t>
<t>
In addition to the Format-Annotation vocabulary, a secondary vocabulary is available
for custom meta-schemas that defines "format" as an assertion. The URI for the
Format-Assertion vocabulary, is:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comma

&lt;https://json-schema.org/draft/2020-11/vocab/format-assertion&gt;.
</t>
<t>
The current URI for the corresponding meta-schema is:
<eref target="https://json-schema.org/draft/2020-11/meta/format"/>. Because the
syntactic requirements of "format" do not change between the annotation and assertion
vocabularies, the meta-schema is shared between them.
&lt;https://json-schema.org/draft/2020-11/vocab/format-assertion&gt;. The current
URI for the corresponding meta-schema is:
<eref target="https://json-schema.org/draft/2020-11/meta/format-assertion"/>.
Implementing support for the Format-Assertion vocabulary is OPTIONAL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested change:

  •                 Implementations MAY choose to support this vocabulary.
    

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPTIONAL is proper language. RFC 2119 section 5.

</t>
<t>
Specifying both the Format-Annotation and the Format-Assertion vocabularies is functionally
Expand Down
14 changes: 14 additions & 0 deletions meta/format-annotation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/format-annotation",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/format-annotation": true
},
"$dynamicAnchor": "meta",

"title": "Format vocabulary meta-schema",
gregsdennis marked this conversation as resolved.
Show resolved Hide resolved
"type": ["object", "boolean"],
"properties": {
"format": { "type": "string" }
}
}
4 changes: 2 additions & 2 deletions meta/format.json → meta/format-assertion.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/format",
"$id": "https://json-schema.org/draft/2019-09/meta/format-assertion",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/format": true
"https://json-schema.org/draft/2019-09/vocab/format-assertion": true
},
"$dynamicAnchor": "meta",

Expand Down