Skip to content

Commit 625ec99

Browse files
authored
Merge pull request #1051 from ssilverman/fix-m-contains
[1044] Improve "maxContains" and "minContains" descriptions
2 parents 4d0694c + a0405f3 commit 625ec99

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

jsonschema-validation.xml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,13 @@
413413
then this keyword has no effect.
414414
</t>
415415
<t>
416-
An array instance is valid against "maxContains" if its
417-
value is less than or equal to, the array length of the annotation
418-
result from an adjacent
419-
<xref target="json-schema">"contains"</xref> keyword where the
420-
annotation is an array, or the length of the instance array
421-
where the annotation is "true".
416+
An instance array is valid against "maxContains" in two ways, depending on
417+
the form of the annotation result of an adjacent
418+
<xref target="json-schema">"contains"</xref> keyword. The first way is if
419+
the annotation result is an array and the length of that array is less than
420+
or equal to the "maxContains" value. The second way is if the annotation
421+
result is a boolean "true" and the instance array length is less than or
422+
equal to the "maxContains" value.
422423
</t>
423424
</section>
424425

@@ -431,12 +432,13 @@
431432
then this keyword has no effect.
432433
</t>
433434
<t>
434-
An array instance is valid against "minContains" if its
435-
value is greater than or equal to, the array length of the annotation
436-
result from an adjacent
437-
<xref target="json-schema">"contains"</xref> keyword where the
438-
annotation is an array, or the length of the instance array
439-
where the annotation is "true".
435+
An instance array is valid against "minContains" in two ways, depending on
436+
the form of the annotation result of an adjacent
437+
<xref target="json-schema">"contains"</xref> keyword. The first way is if
438+
the annotation result is an array and the length of that array is greater
439+
than or equal to the "minContains" value. The second way is if the
440+
annotation result is a boolean "true" and the instance array length is
441+
greater than or equal to the "minContains" value.
440442
</t>
441443
<t>
442444
A value of 0 is allowed, but is only useful for setting a range

0 commit comments

Comments
 (0)