Skip to content

Commit 7e81fe4

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 e9b28ba commit 7e81fe4

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
@@ -1180,7 +1180,9 @@
11801180

11811181
<section title='"default"'>
11821182
<t>
1183-
There are no restrictions placed on the value of this keyword.
1183+
There are no restrictions placed on the value of this keyword. When
1184+
multiple occurrences of this keyword are applicable to a single
1185+
sub-instance, implementations SHOULD remove duplicates.
11841186
</t>
11851187
<t>
11861188
This keyword can be used to supply a default JSON value associated with a
@@ -1191,13 +1193,16 @@
11911193

11921194
<section title='"readOnly"'>
11931195
<t>
1194-
The value of this keyword MUST be a boolean.
1196+
The value of this keyword MUST be a boolean. When multiple occurrences
1197+
of this keyword are applicable to a single sub-instance, the resulting
1198+
value MUST be true if any occurrence specifies a true value, and MUST
1199+
be false otherwise.
11951200
</t>
11961201
<t>
1197-
If it has a value of boolean true, this keyword indicates that the value of the
1198-
instance is managed exclusively by the owning authority, and attempts by an
1199-
application to modify the value of this property are expected to be ignored or
1200-
rejected by that owning authority.
1202+
If it has a value of boolean true, this keyword indicates that the value
1203+
of the instance is managed exclusively by the owning authority, and
1204+
attempts by an application to modify the value of this property are
1205+
expected to be ignored or rejected by that owning authority.
12011206
</t>
12021207
<t>
12031208
For example, this property would be used to mark a database-generated serial
@@ -1215,19 +1220,21 @@
12151220
<t>
12161221
The value of this keyword MUST be an array.
12171222
There are no restrictions placed on the values within the array.
1223+
When multiple occurrences of this keyword are applicable to a single
1224+
sub-instance, implementations MUST provide a flat array of all
1225+
values rather than an array of arrays.
12181226
</t>
12191227
<t>
12201228
This keyword can be used to provide sample JSON values associated with a
12211229
particular schema, for the purpose of illustrating usage. It is
12221230
RECOMMENDED that these values be valid against the associated schema.
12231231
</t>
12241232
<t>
1225-
Implementations MAY use the value of "default", if present, as
1233+
Implementations MAY use the value(s) of "default", if present, as
12261234
an additional example. If "examples" is absent, "default"
12271235
MAY still be used in this manner.
12281236
</t>
12291237
</section>
1230-
12311238
</section>
12321239
</section>
12331240

0 commit comments

Comments
 (0)