Skip to content

Commit 8acb128

Browse files
committed
split format meta-schemas; explicitly specify implementation support for format
1 parent 9d29a9f commit 8acb128

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

jsonschema-validation.xml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -540,20 +540,19 @@
540540

541541
<t>
542542
The current URI for this vocabulary, known as the Format-Annotation vocabulary, is:
543-
&lt;https://json-schema.org/draft/2020-11/vocab/format-annotation&gt;. This vocabulary
544-
is required by this specification.
543+
&lt;https://json-schema.org/draft/2020-11/vocab/format-annotation&gt;. The current
544+
URI for the corresponding meta-schema is:
545+
<eref target="https://json-schema.org/draft/2020-11/meta/format-annotation"/>.
546+
Implementing support for this vocabulary is REQUIRED.
545547
</t>
546548
<t>
547549
In addition to the Format-Annotation vocabulary, a secondary vocabulary is available
548550
for custom meta-schemas that defines "format" as an assertion. The URI for the
549551
Format-Assertion vocabulary, is:
550-
&lt;https://json-schema.org/draft/2020-11/vocab/format-assertion&gt;.
551-
</t>
552-
<t>
553-
The current URI for the corresponding meta-schema is:
554-
<eref target="https://json-schema.org/draft/2020-11/meta/format"/>. Because the
555-
syntactic requirements of "format" do not change between the annotation and assertion
556-
vocabularies, the meta-schema is shared between them.
552+
&lt;https://json-schema.org/draft/2020-11/vocab/format-assertion&gt;. The current
553+
URI for the corresponding meta-schema is:
554+
<eref target="https://json-schema.org/draft/2020-11/meta/format-assertion"/>.
555+
Implementing support for the Format-Assertion vocabulary is OPTIONAL.
557556
</t>
558557
<t>
559558
Specifying both the Format-Annotation and the Format-Assertion vocabularies is functionally

meta/format-annotation.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/format-annotation",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2019-09/vocab/format-annotation": true
6+
},
7+
"$dynamicAnchor": "meta",
8+
9+
"title": "Format vocabulary meta-schema",
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"format": { "type": "string" }
13+
}
14+
}

meta/format.json renamed to meta/format-assertion.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/draft/2019-09/schema",
3-
"$id": "https://json-schema.org/draft/2019-09/meta/format",
3+
"$id": "https://json-schema.org/draft/2019-09/meta/format-assertion",
44
"$vocabulary": {
5-
"https://json-schema.org/draft/2019-09/vocab/format": true
5+
"https://json-schema.org/draft/2019-09/vocab/format-assertion": true
66
},
77
"$dynamicAnchor": "meta",
88

0 commit comments

Comments
 (0)