|
172 | 172 |
|
173 | 173 | <section title="Validation of primitive types and child values">
|
174 | 174 | <t>
|
175 |
| - Two of the primitive types, array and object, allow for child values. The validation of |
176 |
| - the primitive type is considered separately from the validation of child instances. |
| 175 | + Two of the primitive types, array and object, allow for child values. |
| 176 | + The validation of the primitive type is considered separately from |
| 177 | + the validation of child instances. |
177 | 178 | </t>
|
178 | 179 | <t>
|
179 |
| - For arrays, primitive type validation consists of validating restrictions on length. |
| 180 | + For arrays, primitive type validation consists of validating |
| 181 | + restrictions on length with "minItems" and "maxItems", while |
| 182 | + "items" and "additionalItems" control which subschemas apply |
| 183 | + to which elements of the array. In addition, "uniqueItems" |
| 184 | + and "contains" validate array contents as a whole. |
180 | 185 | </t>
|
181 | 186 | <t>
|
182 |
| - For objects, primitive type validation consists of validating restrictions on the presence |
183 |
| - or absence of property names. |
| 187 | + For objects, primitive type validation consists of validating |
| 188 | + restrictions on which and how many properties appear with |
| 189 | + "required", "minProperties", "maxProperties", and the string |
| 190 | + array form of "dependencies", while "properties", |
| 191 | + "patternProperties", and "additionalProperties" control which |
| 192 | + subschemas apply to which object property values. |
| 193 | + In addition, the schema form of "dependencies" validates the |
| 194 | + object as a whole based on the presence of specific property names. |
184 | 195 | </t>
|
185 | 196 | </section>
|
186 | 197 |
|
|
335 | 346 | If absent, it can be considered present with an empty schema.
|
336 | 347 | </t>
|
337 | 348 | <t>
|
338 |
| - This keyword controls child instance validation. Validation of the |
339 |
| - primitive instance type against this keyword always succeeds. |
| 349 | + This keyword controls child instance validation for arrays. |
| 350 | + Validation of the primitive instance type against this keyword |
| 351 | + always succeeds. |
340 | 352 | </t>
|
341 | 353 | <t>
|
342 | 354 | If "items" is a schema, child validation succeeds if all elements
|
|
357 | 369 | If absent, it can be considered present with an empty schema.
|
358 | 370 | </t>
|
359 | 371 | <t>
|
360 |
| - This keyword controls child instance validation. Validation of the |
361 |
| - primitive instance type against this keyword always succeeds. |
| 372 | + This keyword controls child instance validation for arrays. |
| 373 | + Validation of the primitive instance type against this keyword |
| 374 | + always succeeds. |
362 | 375 | </t>
|
363 | 376 | <t>
|
364 | 377 | If "items" is an array of schemas, child validation succeeds
|
|
469 | 482 | MUST be a valid JSON Schema.
|
470 | 483 | </t>
|
471 | 484 | <t>
|
472 |
| - If absent, it can be considered the same as an empty object. |
| 485 | + If absent, it can be considered the same as an empty schema. |
473 | 486 | </t>
|
474 | 487 | <t>
|
475 |
| - This keyword controls child instance validation. Validation of the |
476 |
| - primitive instance type against this keyword always succeeds. |
| 488 | + This keyword controls child instance validation for objects. |
| 489 | + Validation of the primitive instance type against this keyword |
| 490 | + always succeeds. |
477 | 491 | </t>
|
478 | 492 | <t>
|
479 | 493 | Child validation succeeds if, for each name that appears in both
|
480 |
| - the instance and as a name within this keyword's value, the instance |
481 |
| - value successfully validates against the corresponding schema. |
| 494 | + the instance and as a name within this keyword's value, the child |
| 495 | + instance for that name successfully validates against the |
| 496 | + corresponding schema. |
482 | 497 | </t>
|
483 | 498 | </section>
|
484 | 499 |
|
|
490 | 505 | MUST be a valid JSON Schema.
|
491 | 506 | </t>
|
492 | 507 | <t>
|
493 |
| - If absent, it can be considered the same as an empty object. |
| 508 | + If absent, it can be considered the same as an empty schema. |
494 | 509 | </t>
|
495 | 510 | <t>
|
496 |
| - This keyword controls child instance validation. Validation of the |
497 |
| - primitive instance type against this keyword always succeeds. |
| 511 | + This keyword controls child instance validation for objects. |
| 512 | + Validation of the primitive instance type against this keyword |
| 513 | + always succeeds. |
498 | 514 | </t>
|
499 | 515 | <t>
|
500 | 516 | Child validation succeeds if, for each instance name that matches any
|
|
513 | 529 | an empty schema as a value.
|
514 | 530 | </t>
|
515 | 531 | <t>
|
516 |
| - This keyword controls child instance validation. Validation of the |
517 |
| - primitive instance type against this keyword always succeeds. |
| 532 | + This keyword controls child instance validation for objects. |
| 533 | + Validation of the primitive instance type against this keyword |
| 534 | + always succeeds. |
518 | 535 | </t>
|
519 | 536 | <t>
|
520 | 537 | Child validation with "additionalProperties" applies only to the child
|
|
0 commit comments