|
179 | 179 |
|
180 | 180 | <section title="Validation of primitive types and child values">
|
181 | 181 | <t>
|
182 |
| - Two of the primitive types, array and object, allow for child values. The validation of |
183 |
| - the primitive type is considered separately from the validation of child instances. |
| 182 | + Two of the primitive types, array and object, allow for child values. |
| 183 | + The validation of the primitive type is considered separately from |
| 184 | + the validation of child instances. |
184 | 185 | </t>
|
185 | 186 | <t>
|
186 |
| - For arrays, primitive type validation consists of validating restrictions on length. |
| 187 | + For arrays, primitive type validation consists of validating |
| 188 | + restrictions on length with "minItems" and "maxItems", while |
| 189 | + "items" and "additionalItems" determine which subschemas apply |
| 190 | + to which elements of the array. In addition, "uniqueItems" |
| 191 | + and "contains" validate array contents as a whole. |
187 | 192 | </t>
|
188 | 193 | <t>
|
189 |
| - For objects, primitive type validation consists of validating restrictions on the presence |
190 |
| - or absence of property names. |
| 194 | + For objects, primitive type validation consists of validating |
| 195 | + restrictions on which and how many properties appear with |
| 196 | + "required", "minProperties", "maxProperties", "propertyNames", |
| 197 | + and the string array form of "dependencies", while "properties", |
| 198 | + "patternProperties", and "additionalProperties" determine which |
| 199 | + subschemas apply to which object property values. |
| 200 | + In addition, the schema form of "dependencies" validates the |
| 201 | + object as a whole based on the presence of specific property names. |
191 | 202 | </t>
|
192 | 203 | </section>
|
193 | 204 |
|
|
342 | 353 | If absent, it can be considered present with an empty schema.
|
343 | 354 | </t>
|
344 | 355 | <t>
|
345 |
| - This keyword controls child instance validation. Validation of the |
346 |
| - primitive instance type against this keyword always succeeds. |
| 356 | + This keyword controls child instance validation for arrays. |
| 357 | + Validation of the primitive instance type against this keyword |
| 358 | + always succeeds. |
347 | 359 | </t>
|
348 | 360 | <t>
|
349 | 361 | If "items" is a schema, child validation succeeds if all elements
|
|
364 | 376 | If absent, it can be considered present with an empty schema.
|
365 | 377 | </t>
|
366 | 378 | <t>
|
367 |
| - This keyword controls child instance validation. Validation of the |
368 |
| - primitive instance type against this keyword always succeeds. |
| 379 | + This keyword controls child instance validation for arrays. |
| 380 | + Validation of the primitive instance type against this keyword |
| 381 | + always succeeds. |
369 | 382 | </t>
|
370 | 383 | <t>
|
371 | 384 | If "items" is an array of schemas, child validation succeeds
|
|
476 | 489 | MUST be a valid JSON Schema.
|
477 | 490 | </t>
|
478 | 491 | <t>
|
479 |
| - If absent, it can be considered the same as an empty object. |
| 492 | + If absent, it can be considered the same as an empty schema. |
480 | 493 | </t>
|
481 | 494 | <t>
|
482 |
| - This keyword controls child instance validation. Validation of the |
483 |
| - primitive instance type against this keyword always succeeds. |
| 495 | + This keyword controls child instance validation for objects. |
| 496 | + Validation of the primitive instance type against this keyword |
| 497 | + always succeeds. |
484 | 498 | </t>
|
485 | 499 | <t>
|
486 | 500 | Child validation succeeds if, for each name that appears in both
|
487 |
| - the instance and as a name within this keyword's value, the instance |
488 |
| - value successfully validates against the corresponding schema. |
| 501 | + the instance and as a name within this keyword's value, the child |
| 502 | + instance for that name successfully validates against the |
| 503 | + corresponding schema. |
489 | 504 | </t>
|
490 | 505 | </section>
|
491 | 506 |
|
|
497 | 512 | MUST be a valid JSON Schema.
|
498 | 513 | </t>
|
499 | 514 | <t>
|
500 |
| - If absent, it can be considered the same as an empty object. |
| 515 | + If absent, it can be considered the same as an empty schema. |
501 | 516 | </t>
|
502 | 517 | <t>
|
503 |
| - This keyword controls child instance validation. Validation of the |
504 |
| - primitive instance type against this keyword always succeeds. |
| 518 | + This keyword controls child instance validation for objects. |
| 519 | + Validation of the primitive instance type against this keyword |
| 520 | + always succeeds. |
505 | 521 | </t>
|
506 | 522 | <t>
|
507 | 523 | Child validation succeeds if, for each instance name that matches any
|
|
520 | 536 | an empty schema as a value.
|
521 | 537 | </t>
|
522 | 538 | <t>
|
523 |
| - This keyword controls child instance validation. Validation of the |
524 |
| - primitive instance type against this keyword always succeeds. |
| 539 | + This keyword controls child instance validation for objects. |
| 540 | + Validation of the primitive instance type against this keyword |
| 541 | + always succeeds. |
525 | 542 | </t>
|
526 | 543 | <t>
|
527 | 544 | Child validation with "additionalProperties" applies only to the child
|
|
0 commit comments