|
404 | 404 | Omitting this keyword has the same behavior as a value of false.
|
405 | 405 | </t>
|
406 | 406 | </section>
|
407 |
| - |
408 |
| - <section title="maxContains"> |
409 |
| - <t> |
410 |
| - The value of this keyword MUST be a non-negative integer. |
411 |
| - </t> |
412 |
| - <t> |
413 |
| - If "contains" is not present within the same schema object, |
414 |
| - then this keyword has no effect. |
415 |
| - </t> |
416 |
| - <t> |
417 |
| - An instance array or object is valid against "maxContains" in two ways, |
418 |
| - depending on the form of the annotation result of an adjacent |
419 |
| - <xref target="json-schema">"contains"</xref> keyword. The first way is if |
420 |
| - the annotation result is an array and the length of that array is less than |
421 |
| - or equal to the "maxContains" value. The second way is if the annotation |
422 |
| - result is a boolean "true" and the instance length (number of items or |
423 |
| - properties) is less than or equal to the "maxContains" value. |
424 |
| - </t> |
425 |
| - </section> |
426 |
| - |
427 |
| - <section title="minContains"> |
428 |
| - <t> |
429 |
| - The value of this keyword MUST be a non-negative integer. |
430 |
| - </t> |
431 |
| - <t> |
432 |
| - If "contains" is not present within the same schema object, |
433 |
| - then this keyword has no effect. |
434 |
| - </t> |
435 |
| - <t> |
436 |
| - An instance array or object is valid against "minContains" in two ways, |
437 |
| - depending on the form of the annotation result of an adjacent |
438 |
| - <xref target="json-schema">"contains"</xref> keyword. The first way is if |
439 |
| - the annotation result is an array and the length of that array is greater |
440 |
| - than or equal to the "minContains" value. The second way is if the |
441 |
| - annotation result is a boolean "true" and the instance length (number of |
442 |
| - items or properties) is greater than or equal to the "minContains" value. |
443 |
| - </t> |
444 |
| - <t> |
445 |
| - A value of 0 is allowed, but is only useful for setting a range |
446 |
| - of occurrences from 0 to the value of "maxContains". A value of |
447 |
| - 0 causes "minContains" and "contains" to always pass validation |
448 |
| - (but validation can still fail against a "maxContains" keyword). |
449 |
| - </t> |
450 |
| - <t> |
451 |
| - Omitting this keyword has the same behavior as a value of 1. |
452 |
| - </t> |
453 |
| - </section> |
454 | 407 | </section>
|
455 | 408 |
|
456 | 409 | <section title="Validation Keywords for Objects">
|
|
1368 | 1321 | <section title="Keywords Moved from Validation to Core">
|
1369 | 1322 | <t>
|
1370 | 1323 | Several keywords have been moved from this document into the
|
1371 |
| - <xref target="json-schema">Core Specification</xref> as of this draft, in some |
1372 |
| - cases with re-naming or other changes. This affects the following former |
| 1324 | + <xref target="json-schema">Core Specification</xref> starting with draft 2019-09, |
| 1325 | + in some cases with re-naming or other changes. This affects the following former |
1373 | 1326 | validation keywords:
|
1374 | 1327 | <list style="hanging">
|
1375 | 1328 | <t hangText='"definitions"'>
|
|
1393 | 1346 | For this reason, they are better defined as a generic mechanism on which
|
1394 | 1347 | validation, hyper-schema, and extension vocabularies can all be based.
|
1395 | 1348 | </t>
|
| 1349 | + <t hangText='"maxContains", "minContains"'> |
| 1350 | + These keywords modify the behavior of "contains", and are therefore |
| 1351 | + grouped with it in the applicator vocabulary. |
| 1352 | + </t> |
1396 | 1353 | <t hangText='"dependencies"'>
|
1397 | 1354 | This keyword had two different modes of behavior, which made it
|
1398 | 1355 | relatively challenging to implement and reason about.
|
|
0 commit comments