|
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 |
|
|
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 determines how child instances validate 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 determines how child instances validate 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
|
|
473 | 486 | MUST be a valid JSON Schema.
|
474 | 487 | </t>
|
475 | 488 | <t>
|
476 |
| - If absent, it can be considered the same as an empty object. |
| 489 | + If absent, it can be considered the same as an empty schema. |
477 | 490 | </t>
|
478 | 491 | <t>
|
479 |
| - This keyword controls child instance validation. Validation of the |
480 |
| - primitive instance type against this keyword always succeeds. |
| 492 | + This keyword determines how child instances validate for objects. |
| 493 | + Validation of the primitive instance type against this keyword |
| 494 | + always succeeds. |
481 | 495 | </t>
|
482 | 496 | <t>
|
483 | 497 | Child validation succeeds if, for each name that appears in both
|
484 |
| - the instance and as a name within this keyword's value, the instance |
485 |
| - value successfully validates against the corresponding schema. |
| 498 | + the instance and as a name within this keyword's value, the child |
| 499 | + instance for that name successfully validates against the |
| 500 | + corresponding schema. |
486 | 501 | </t>
|
487 | 502 | </section>
|
488 | 503 |
|
|
494 | 509 | MUST be a valid JSON Schema.
|
495 | 510 | </t>
|
496 | 511 | <t>
|
497 |
| - If absent, it can be considered the same as an empty object. |
| 512 | + If absent, it can be considered the same as an empty schema. |
498 | 513 | </t>
|
499 | 514 | <t>
|
500 |
| - This keyword controls child instance validation. Validation of the |
501 |
| - primitive instance type against this keyword always succeeds. |
| 515 | + This keyword determines how child instances validate for objects. |
| 516 | + Validation of the primitive instance type against this keyword |
| 517 | + always succeeds. |
502 | 518 | </t>
|
503 | 519 | <t>
|
504 | 520 | Child validation succeeds if, for each instance name that matches any
|
|
517 | 533 | an empty schema as a value.
|
518 | 534 | </t>
|
519 | 535 | <t>
|
520 |
| - This keyword controls child instance validation. Validation of the |
521 |
| - primitive instance type against this keyword always succeeds. |
| 536 | + This keyword determines how child instances validate for objects. |
| 537 | + Validation of the primitive instance type against this keyword |
| 538 | + always succeeds. |
522 | 539 | </t>
|
523 | 540 | <t>
|
524 | 541 | Child validation with "additionalProperties" applies only to the child
|
|
0 commit comments