|
151 | 151 | <t> |
152 | 152 | JSON Schema can be extended either by defining additional vocabularies, |
153 | 153 | or less formally by defining additional keywords outside of any vocabulary. |
154 | | - Unrecognized individual keywords are ignored, while the behavior with respect |
155 | | - to an unrecognized vocabulary can be controlled when declaring which |
156 | | - vocabularies are in use. |
| 154 | + Unrecognized individual keywords simply have their values collected as annotations, |
| 155 | + while the behavior with respect to an unrecognized vocabulary can be controlled |
| 156 | + when declaring which vocabularies are in use. |
157 | 157 | </t> |
158 | 158 | <t> |
159 | 159 | This document defines a core vocabulary that MUST be supported by any |
|
354 | 354 | </t> |
355 | 355 | <t> |
356 | 356 | A JSON Schema MAY contain properties which are not schema keywords. |
357 | | - Unknown keywords SHOULD be ignored. |
| 357 | + Unknown keywords SHOULD be treated as annotations, where the value |
| 358 | + of the keyword is the value of the annotation. |
358 | 359 | </t> |
359 | 360 | <t> |
360 | 361 | An empty schema is a JSON Schema with no properties, or only unknown |
|
578 | 579 | by any entity. Save for explicit agreement, schema authors SHALL NOT |
579 | 580 | expect these additional keywords and vocabularies to be supported by |
580 | 581 | implementations that do not explicitly document such support. |
581 | | - Implementations SHOULD ignore keywords they do not support. |
| 582 | + Implementations SHOULD treat keywords they do not support as annotations, |
| 583 | + where the value of the keyword is the value of the annotation. |
582 | 584 | </t> |
583 | 585 | <t> |
584 | 586 | Implementations MAY provide the ability to register or load handlers |
|
1240 | 1242 | </t> |
1241 | 1243 | <t> |
1242 | 1244 | Per <xref target="extending" format="counter"></xref>, unrecognized |
1243 | | - keywords SHOULD be ignored. This remains the case for keywords defined |
| 1245 | + keywords SHOULD be treated as annotations. |
| 1246 | + This remains the case for keywords defined |
1244 | 1247 | by unrecognized vocabularies. It is not currently possible to distinguish |
1245 | 1248 | between unrecognized keywords that are defined in vocabularies from |
1246 | 1249 | those that are not part of any vocabulary. |
@@ -3093,6 +3096,11 @@ https://example.com/schemas/common#/$defs/count/minimum |
3093 | 3096 | system resources. |
3094 | 3097 | Validators MUST NOT fall into an infinite loop. |
3095 | 3098 | </t> |
| 3099 | + <t> |
| 3100 | + A malicious party could cause an implementation to repeatedly collect a copy |
| 3101 | + of a very large value as an annotation. Implementations SHOULD guard against |
| 3102 | + excessive consumption of system resources in such a scenario. |
| 3103 | + </t> |
3096 | 3104 | <t> |
3097 | 3105 | Servers MUST ensure that malicious parties can't change the functionality of |
3098 | 3106 | existing schemas by uploading a schema with a pre-existing or very similar "$id". |
|
0 commit comments