|
246 | 246 | Additional vocabularies SHOULD make use of this mechanism for applying
|
247 | 247 | their own annotations to instances.
|
248 | 248 | </t>
|
249 |
| - <section title="Negated Schemas"> |
| 249 | + <section title="Annotations and Validation Outcomes"> |
250 | 250 | <t>
|
251 |
| - Annotations in a subschema contained within a "not", at any depth, |
252 |
| - including any number of intervening additional "not" subschemas, MUST be |
253 |
| - ignored. Similarly, annotations within a failing branch of a "oneOf", |
254 |
| - "anyOf", "then", or "else" MUST be ignored. |
| 251 | + Annotations are collected whenever an instance is valid against |
| 252 | + a schema object, and all of that schema object's parent schemas. |
| 253 | + </t> |
| 254 | + <t> |
| 255 | + In particular, annotations in a subschema contained within a "not", |
| 256 | + at any depth, including any number of intervening additional "not" |
| 257 | + subschemas, MUST be ignored. If the instance was valid against the |
| 258 | + "not" subschema, then by definition it is not valid against the schema |
| 259 | + that contains the "not", so the "not" subschema's annotations are not used. |
| 260 | + </t> |
| 261 | + <t> |
| 262 | + Similarly, annotations within a failing branch of a "oneOf", "anyOf", |
| 263 | + "then", or "else" MUST be ignored even when the instance successfully |
| 264 | + validates against the complete schema document. |
255 | 265 | </t>
|
256 | 266 | </section>
|
257 | 267 | <section title="Annotations and Short-Circuit Validation">
|
|
1494 | 1504 | <t hangText="draft-handrews-json-schema-validation-01">
|
1495 | 1505 | <list style="symbols">
|
1496 | 1506 | <t>This draft is purely a clarification with no functional changes</t>
|
1497 |
| - <t>Restored ommitted "if present" clause for "else" under "if"</t> |
1498 |
| - <t>Clarified that when "if" is absent, the results of "then" and "else" are ignored</t> |
| 1507 | + <t>Provided the general principle behind ignoring annotations under "not" and similar cases</t> |
| 1508 | + <t>Clarified "if"/"then"/"else" validation interactions</t> |
| 1509 | + <t>Clarified "if"/"then"/"else" behavior for annotation</t> |
1499 | 1510 | <t>Minor formatting and cross-referencing improvements</t>
|
1500 | 1511 | </list>
|
1501 | 1512 | </t>
|
|
0 commit comments