Skip to content

Commit b8dc783

Browse files
committed
More collect unknown keywords as annotations
I seem to have missed the majority of references in the previous commit.
1 parent cad29ac commit b8dc783

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

jsonschema-core.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@
150150
<t>
151151
JSON Schema can be extended either by defining additional vocabularies,
152152
or less formally by defining additional keywords outside of any vocabulary.
153-
Unrecognized individual keywords are ignored, while the behavior with respect
154-
to an unrecognized vocabulary can be controlled when declaring which
155-
vocabularies are in use.
153+
Unrecognized individual keywords simply have their values collected as annotations,
154+
while the behavior with respect to an unrecognized vocabulary can be controlled
155+
when declaring which vocabularies are in use.
156156
</t>
157157
<t>
158158
This document defines a core vocabulary that MUST be supported by any
@@ -351,7 +351,8 @@
351351
</t>
352352
<t>
353353
A JSON Schema MAY contain properties which are not schema keywords.
354-
Unknown keywords SHOULD be treated as annotations.
354+
Unknown keywords SHOULD be treated as annotations, where the value
355+
of the keyword is the value of the annotation.
355356
</t>
356357
<t>
357358
An empty schema is a JSON Schema with no properties, or only unknown
@@ -575,7 +576,8 @@
575576
by any entity. Save for explicit agreement, schema authors SHALL NOT
576577
expect these additional keywords and vocabularies to be supported by
577578
implementations that do not explicitly document such support.
578-
Implementations SHOULD ignore keywords they do not support.
579+
Implementations SHOULD treat keywords they do not support as annotations,
580+
where the value of the keyword is the value of the annotation.
579581
</t>
580582
<t>
581583
Implementations MAY provide the ability to register or load handlers
@@ -1237,7 +1239,8 @@
12371239
</t>
12381240
<t>
12391241
Per <xref target="extending" format="counter"></xref>, unrecognized
1240-
keywords SHOULD be ignored. This remains the case for keywords defined
1242+
keywords SHOULD be treated as annotations.
1243+
This remains the case for keywords defined
12411244
by unrecognized vocabularies. It is not currently possible to distinguish
12421245
between unrecognized keywords that are defined in vocabularies from
12431246
those that are not part of any vocabulary.

0 commit comments

Comments
 (0)