Skip to content

Commit d5cd621

Browse files
committed
Specify multi-value annotation behavior.
With the applicability/attachment concept, we now have a way to talk about what happens when multiple annotation values are present. Add notes to each keyword as needed.
1 parent acc2060 commit d5cd621

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

jsonschema-validation.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,9 @@
12171217

12181218
<section title='"default"'>
12191219
<t>
1220-
There are no restrictions placed on the value of this keyword.
1220+
There are no restrictions placed on the value of this keyword. When
1221+
multiple occurrences of this keyword are applicable to a single
1222+
sub-instance, implementations SHOULD remove duplicates.
12211223
</t>
12221224
<t>
12231225
This keyword can be used to supply a default JSON value associated with a
@@ -1228,13 +1230,16 @@
12281230

12291231
<section title='"readOnly"'>
12301232
<t>
1231-
The value of this keyword MUST be a boolean.
1233+
The value of this keyword MUST be a boolean. When multiple occurrences
1234+
of this keyword are applicable to a single sub-instance, the resulting
1235+
value MUST be true if any occurrence specifies a true value, and MUST
1236+
be false otherwise.
12321237
</t>
12331238
<t>
1234-
If it has a value of boolean true, this keyword indicates that the value of the
1235-
instance is managed exclusively by the owning authority, and attempts by an
1236-
application to modify the value of this property are expected to be ignored or
1237-
rejected by that owning authority.
1239+
If it has a value of boolean true, this keyword indicates that the value
1240+
of the instance is managed exclusively by the owning authority, and
1241+
attempts by an application to modify the value of this property are
1242+
expected to be ignored or rejected by that owning authority.
12381243
</t>
12391244
<t>
12401245
For example, this property would be used to mark a database-generated serial
@@ -1252,19 +1257,21 @@
12521257
<t>
12531258
The value of this keyword MUST be an array.
12541259
There are no restrictions placed on the values within the array.
1260+
When multiple occurrences of this keyword are applicable to a single
1261+
sub-instance, implementations MUST provide a flat array of all
1262+
values rather than an array of arrays.
12551263
</t>
12561264
<t>
12571265
This keyword can be used to provide sample JSON values associated with a
12581266
particular schema, for the purpose of illustrating usage. It is
12591267
RECOMMENDED that these values be valid against the associated schema.
12601268
</t>
12611269
<t>
1262-
Implementations MAY use the value of "default", if present, as
1270+
Implementations MAY use the value(s) of "default", if present, as
12631271
an additional example. If "examples" is absent, "default"
12641272
MAY still be used in this manner.
12651273
</t>
12661274
</section>
1267-
12681275
</section>
12691276
</section>
12701277

0 commit comments

Comments
 (0)