|
297 | 297 | </t>
|
298 | 298 | </section>
|
299 | 299 |
|
300 |
| - <section title="additionalItems and items"> |
| 300 | + <section title="items"> |
301 | 301 | <t>
|
302 |
| - The value of "additionalItems" MUST be either a boolean or an object. If |
303 |
| - it is an object, this object MUST be a valid JSON Schema. |
| 302 | + The value of "items" MUST be either an object or an array of objects. |
| 303 | + Each object MUST be a valid JSON Schema. |
304 | 304 | </t>
|
305 | 305 | <t>
|
306 |
| - The value of "items" MUST be either a schema or array of schemas. |
| 306 | + If absent, it can be considered present with an empty schema. |
307 | 307 | </t>
|
308 | 308 | <t>
|
309 |
| - Successful validation of an array instance with regards to these two |
310 |
| - keywords is determined as follows: |
| 309 | + Validation of this keyword against the instance always succeeds. |
| 310 | + </t> |
| 311 | + <t> |
| 312 | + If "items" is a schema, child validation succeeds if all elements |
| 313 | + in the array successfully validate against that schema. |
| 314 | + </t> |
| 315 | + <t> |
| 316 | + If "items" is an array of schemas, child validation succeeds if |
| 317 | + each element of the instance validates against the schema at the |
| 318 | + same position, if any. |
| 319 | + </t> |
| 320 | + </section> |
311 | 321 |
|
312 |
| - <list> |
313 |
| - <t>if "items" is not present, or its value is an object, validation |
314 |
| - of the instance always succeeds, regardless of the value of |
315 |
| - "additionalItems";</t> |
316 |
| - <t>if the value of "additionalItems" is boolean value true or an |
317 |
| - object, validation of the instance always succeeds;</t> |
318 |
| - <t>if the value of "additionalItems" is boolean value false and the |
319 |
| - value of "items" is an array, the instance is valid if |
320 |
| - its size is less than, or equal to, the size of "items".</t> |
321 |
| - </list> |
| 322 | + <section title="additionalItems"> |
| 323 | + <t> |
| 324 | + The value of "additionalItems" MUST be a boolean or an object. |
| 325 | + If it is an object, the object MUST be a valid JSON Schema. |
| 326 | + </t> |
| 327 | + <t> |
| 328 | + If absent, it can be considered present with an empty schema. |
| 329 | + </t> |
| 330 | + <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". |
322 | 340 | </t>
|
323 | 341 | <t>
|
324 |
| - If either keyword is absent, it may be considered present with an empty |
| 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. |
| 348 | + </t> |
| 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" |
325 | 353 | schema.
|
326 | 354 | </t>
|
327 | 355 | </section>
|
|
415 | 443 | <t>
|
416 | 444 | If absent, it can be considered the same as an empty object.
|
417 | 445 | </t>
|
| 446 | + <t> |
| 447 | + Validation of this keyword against the instance always succeeds. |
| 448 | + </t> |
| 449 | + <t> |
| 450 | + Child validation succeeds if, for each name that appears in both |
| 451 | + the instance and as a name within this keyword's value, the instance |
| 452 | + value successfully validates against the corresponding schema. |
| 453 | + </t> |
418 | 454 | </section>
|
419 | 455 |
|
420 | 456 | <section title="patternProperties">
|
|
427 | 463 | <t>
|
428 | 464 | If absent, it can be considered the same as an empty object.
|
429 | 465 | </t>
|
| 466 | + <t> |
| 467 | + Validaton of this keyword against the instance always succeeds. |
| 468 | + </t> |
| 469 | + <t> |
| 470 | + Child validation succeeds if, for each instance name that matches any |
| 471 | + regular expressions that appear as a property name in this keyword's value, |
| 472 | + the child instance for that name successfully validates against each |
| 473 | + schema that corresponds to a matching regular expression. |
| 474 | + </t> |
430 | 475 | </section>
|
431 | 476 |
|
432 | 477 | <section title="additionalProperties">
|
433 | 478 | <t>
|
434 |
| - The value of "additionalProperties" MUST be a boolean or a schema. |
| 479 | + The value of "additionalProperties" MUST be a boolean or an |
| 480 | + object. If it is an object, the object MUST be a valid JSON Schema. |
435 | 481 | </t>
|
436 | 482 | <t>
|
437 | 483 | If "additionalProperties" is absent, it may be considered present with
|
438 | 484 | an empty schema as a value.
|
439 | 485 | </t>
|
440 | 486 | <t>
|
441 |
| - If "additionalProperties" is true, validation always succeeds. |
| 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". |
| 495 | + </t> |
| 496 | + <t> |
| 497 | + Child validation with "additionalProperties" applies only to the child |
| 498 | + valuse of instance names that do not match any names in "properties", |
| 499 | + and do not match any regular expression in "patternProperties". |
442 | 500 | </t>
|
443 | 501 | <t>
|
444 |
| - If "additionalProperties" is false, validation succeeds only if the instance |
445 |
| - is an object and all properties on the instance were covered by "properties" |
446 |
| - and/or "patternProperties". |
| 502 | + If "additionalProperties" is true, child validation always succeeds. |
447 | 503 | </t>
|
448 | 504 | <t>
|
449 |
| - If "additionalProperties" is an object, validate the value as a schema to all |
450 |
| - of the properties that weren't validated by "properties" nor "patternProperties". |
| 505 | + If "additionalProperties" is a schema, child validation succeeds if |
| 506 | + all child instances to which "additionalProperties" applies validate |
| 507 | + against that schema. |
451 | 508 | </t>
|
452 | 509 | </section>
|
453 | 510 |
|
|
0 commit comments