|
168 | 168 | </t>
|
169 | 169 | </section>
|
170 | 170 |
|
| 171 | + <section title="Validation of primitive types and child values"> |
| 172 | + <t> |
| 173 | + Two of the primitive types, array and object, allow for child values. The validation of |
| 174 | + the primitive type is considered separately from the validation of child instances. |
| 175 | + </t> |
| 176 | + <t> |
| 177 | + For arrays, primitive type validation consists of validating restrictions on length. |
| 178 | + </t> |
| 179 | + <t> |
| 180 | + For objects, primitive type validation consists of validating restrictions on the presence |
| 181 | + or absence of property names. |
| 182 | + </t> |
| 183 | + </section> |
| 184 | + |
171 | 185 | <section title="Missing keywords">
|
172 | 186 | <t>
|
173 | 187 | Validation keywords that are missing never restrict validation.
|
|
306 | 320 | If absent, it can be considered present with an empty schema.
|
307 | 321 | </t>
|
308 | 322 | <t>
|
309 |
| - Validation of this keyword against the instance always succeeds. |
| 323 | + This keyword controls child instance validation. Validation of the |
| 324 | + primitive instance type against this keyword always succeeds. |
310 | 325 | </t>
|
311 | 326 | <t>
|
312 | 327 | If "items" is a schema, child validation succeeds if all elements
|
|
328 | 343 | If absent, it can be considered present with an empty schema.
|
329 | 344 | </t>
|
330 | 345 | <t>
|
331 |
| - If "additionalItems" is true or a schema, or if "items" |
332 |
| - is absent or a single schema, or if the instance is not |
333 |
| - an array, then validation of the instance always succeeds. |
334 |
| - </t> |
335 |
| - <t> |
336 |
| - If "additionalItems" is false, and "items" is an array |
337 |
| - of schemas, validation of the instance succeeds if |
338 |
| - the size of the instance is less than, or equal to, |
339 |
| - the size of "items". |
340 |
| - </t> |
341 |
| - <t> |
342 |
| - Child validation with respect to "additionalItems" only applies |
343 |
| - when "items" is an array of schemas, and only applies to |
344 |
| - instance elements at positions greater than the size of "items". |
345 |
| - </t> |
346 |
| - <t> |
347 |
| - If "additionalItems" is true, child validation always succeeds. |
| 346 | + This keyword controls child instance validation. Validation of the |
| 347 | + primitive instance type against this keyword always succeeds. |
348 | 348 | </t>
|
349 | 349 | <t>
|
350 |
| - If "additionalItems" is a schema, child validation succeeds |
351 |
| - if all instance elements at positions greater than the size |
352 |
| - of "items" successfully validate against the "additionalItems" |
353 |
| - schema. |
| 350 | + If "items" is an array of schemas, child validation succeeds |
| 351 | + if every instance element at a position greater than the size |
| 352 | + of "items" validates against "additionalItems". |
354 | 353 | </t>
|
355 | 354 | </section>
|
356 | 355 |
|
|
444 | 443 | If absent, it can be considered the same as an empty object.
|
445 | 444 | </t>
|
446 | 445 | <t>
|
447 |
| - Validation of this keyword against the instance always succeeds. |
| 446 | + This keyword controls child instance validation. Validation of the |
| 447 | + primitive instance type against this keyword always succeeds. |
448 | 448 | </t>
|
449 | 449 | <t>
|
450 | 450 | Child validation succeeds if, for each name that appears in both
|
|
464 | 464 | If absent, it can be considered the same as an empty object.
|
465 | 465 | </t>
|
466 | 466 | <t>
|
467 |
| - Validaton of this keyword against the instance always succeeds. |
| 467 | + This keyword controls child instance validation. Validation of the |
| 468 | + primitive instance type against this keyword always succeeds. |
468 | 469 | </t>
|
469 | 470 | <t>
|
470 | 471 | Child validation succeeds if, for each instance name that matches any
|
|
484 | 485 | an empty schema as a value.
|
485 | 486 | </t>
|
486 | 487 | <t>
|
487 |
| - If "additionalProperties" is either true or a schema, or if the instance |
488 |
| - is not an object, validation against the instance always succeeds. |
489 |
| - </t> |
490 |
| - <t> |
491 |
| - If "additionalProperties" is false and the instance is an object, |
492 |
| - validation against the instance succeeds only if all properties names |
493 |
| - in the instance match a name specified in "properties" and/or match |
494 |
| - at least one regular expression specified in "patternProperties". |
| 488 | + This keyword controls child instance validation. Validation of the |
| 489 | + primitive instance type against this keyword always succeeds. |
495 | 490 | </t>
|
496 | 491 | <t>
|
497 | 492 | Child validation with "additionalProperties" applies only to the child
|
498 |
| - valuse of instance names that do not match any names in "properties", |
| 493 | + values of instance names that do not match any names in "properties", |
499 | 494 | and do not match any regular expression in "patternProperties".
|
500 | 495 | </t>
|
501 | 496 | <t>
|
502 |
| - If "additionalProperties" is true, child validation always succeeds. |
503 |
| - </t> |
504 |
| - <t> |
505 |
| - If "additionalProperties" is a schema, child validation succeeds if |
506 |
| - all child instances to which "additionalProperties" applies validate |
507 |
| - against that schema. |
| 497 | + For all such properties, child validation succeeds if the child instance |
| 498 | + validates agains the "additionalProperties" schema. |
508 | 499 | </t>
|
509 | 500 | </section>
|
510 | 501 |
|
|
0 commit comments