|
2367 | 2367 | Implementations that do not support annotation collection MUST do so.
|
2368 | 2368 | </t>
|
2369 | 2369 | </section>
|
2370 |
| - |
2371 |
| - <section title="contains"> |
2372 |
| - <t> |
2373 |
| - The value of this keyword MUST be a valid JSON Schema. |
2374 |
| - </t> |
2375 |
| - <t> |
2376 |
| - An array instance is valid against "contains" if at least one of |
2377 |
| - its elements is valid against the given schema, |
2378 |
| - except when "minContains" is present and has a value of 0, in which |
2379 |
| - case an array instance MUST be considered valid against the "contains" keyword, |
2380 |
| - even if none of its elements is valid against the given schema. |
2381 |
| - </t> |
2382 |
| - <t> |
2383 |
| - An object instance is valid against "contains" if at least one of |
2384 |
| - its properties is valid against the given schema, |
2385 |
| - except when "minContains" is present and has a value of 0, in which |
2386 |
| - case an object instance MUST be considered valid against the "contains" keyword, |
2387 |
| - even if none of its property values is valid against the given schema. |
2388 |
| - </t> |
2389 |
| - <t> |
2390 |
| - This keyword produces an annotation value which is an array of the |
2391 |
| - indexes or property names to which this keyword validates successfully |
2392 |
| - when applying its subschema, in ascending order. The value MAY be a |
2393 |
| - boolean "true" if the subschema validates successfully when applied to |
2394 |
| - every index or property value of the instance. The annotation MUST be |
2395 |
| - present if the instance array or object to which this keyword's schema |
2396 |
| - applies is empty. |
2397 |
| - </t> |
2398 |
| - <t> |
2399 |
| - This annotation affects the behavior of "unevaluatedItems" in the |
2400 |
| - Unevaluated vocabulary, and MAY also be used to implement the |
2401 |
| - "minContains" and "maxContains" keywords in the Validation vocabulary. |
2402 |
| - </t> |
2403 |
| - <t> |
2404 |
| - The subschema MUST be applied to every array element even after the first |
2405 |
| - match has been found, in order to collect annotations for use by other |
2406 |
| - keywords. This is to ensure that all possible annotations are collected. |
2407 |
| - </t> |
2408 |
| - </section> |
2409 | 2370 | </section>
|
2410 | 2371 |
|
2411 | 2372 | <section title="Keywords for Applying Subschemas to Objects">
|
|
2517 | 2478 | </t>
|
2518 | 2479 | </section>
|
2519 | 2480 | </section>
|
| 2481 | + |
| 2482 | + <section title="Other Keywords for Applying Subschemas"> |
| 2483 | + |
| 2484 | + <section title="contains"> |
| 2485 | + <t> |
| 2486 | + The value of this keyword MUST be a valid JSON Schema. |
| 2487 | + </t> |
| 2488 | + <t> |
| 2489 | + An array instance is valid against "contains" if at least one of |
| 2490 | + its elements is valid against the given schema, |
| 2491 | + except when "minContains" is present and has a value of 0, in which |
| 2492 | + case an array instance MUST be considered valid against the "contains" keyword, |
| 2493 | + even if none of its elements is valid against the given schema. |
| 2494 | + </t> |
| 2495 | + <t> |
| 2496 | + An object instance is valid against "contains" if at least one of |
| 2497 | + its properties is valid against the given schema, |
| 2498 | + except when "minContains" is present and has a value of 0, in which |
| 2499 | + case an object instance MUST be considered valid against the "contains" keyword, |
| 2500 | + even if none of its property values is valid against the given schema. |
| 2501 | + </t> |
| 2502 | + <t> |
| 2503 | + This keyword produces an annotation value which is an array of the |
| 2504 | + indexes or property names to which this keyword validates successfully |
| 2505 | + when applying its subschema, in ascending order. The value MAY be a |
| 2506 | + boolean "true" if the subschema validates successfully when applied to |
| 2507 | + every index or property value of the instance. The annotation MUST be |
| 2508 | + present if the instance array or object to which this keyword's schema |
| 2509 | + applies is empty. |
| 2510 | + </t> |
| 2511 | + <t> |
| 2512 | + This annotation affects the behavior of "unevaluatedItems" in the |
| 2513 | + Unevaluated vocabulary, and MAY also be used to implement the |
| 2514 | + "minContains" and "maxContains" keywords in the Validation vocabulary. |
| 2515 | + </t> |
| 2516 | + <t> |
| 2517 | + The subschema MUST be applied to every array element even after the first |
| 2518 | + match has been found, in order to collect annotations for use by other |
| 2519 | + keywords. This is to ensure that all possible annotations are collected. |
| 2520 | + </t> |
| 2521 | + </section> |
| 2522 | + </section> |
2520 | 2523 | </section>
|
2521 | 2524 | </section>
|
2522 | 2525 |
|
|
0 commit comments