|
50 | 50 | </address>
|
51 | 51 | </author>
|
52 | 52 |
|
53 |
| - <date year="2021"/> |
| 53 | + <date year="2022"/> |
54 | 54 | <workgroup>Internet Engineering Task Force</workgroup>
|
55 | 55 | <keyword>JSON</keyword>
|
56 | 56 | <keyword>Schema</keyword>
|
|
399 | 399 | of any vocabulary, there is no analogous mechanism to indicate individual
|
400 | 400 | keyword usage.
|
401 | 401 | </t>
|
| 402 | + <t> |
| 403 | + A schema vocabulary can be defined by anything from an informal description |
| 404 | + to a standards proposal, depending on the audience and interoperability |
| 405 | + expectations. In particular, in order to facilitate vocabulary use within |
| 406 | + non-public organizations, a vocabulary specification need not be published |
| 407 | + outside of its scope of use. |
| 408 | + </t> |
402 | 409 | </section>
|
403 | 410 | <section title="Meta-Schemas">
|
404 | 411 | <t>
|
|
1856 | 1863 | no point in forbidding it, while others have argued that it complicates
|
1857 | 1864 | schema identification and should be forbidden. Feedback on this
|
1858 | 1865 | topic is encouraged.
|
| 1866 | + After some discussion, we feel that we need to remove the use of |
| 1867 | + "canonical" in favour of talking about JSON Pointers which reference |
| 1868 | + across schema resource boundaries as undefined or even forbidden behavior |
| 1869 | + (https://github.com/json-schema-org/json-schema-spec/issues/937, |
| 1870 | + https://github.com/json-schema-org/json-schema-spec/issues/1183) |
1859 | 1871 | </cref>
|
1860 | 1872 | </t>
|
1861 | 1873 | <t>
|
|
2088 | 2100 | The current URI for the corresponding meta-schema is:
|
2089 | 2101 | <eref target="https://json-schema.org/draft/2020-12/meta/applicator"/>.
|
2090 | 2102 | </t>
|
2091 |
| - <t> |
2092 |
| - Updated vocabulary and meta-schema URIs MAY be published between |
2093 |
| - specification drafts in order to correct errors. Implementations |
2094 |
| - SHOULD consider URIs dated after this specification draft and |
2095 |
| - before the next to indicate the same syntax and semantics |
2096 |
| - as those listed here. |
2097 |
| - </t> |
2098 | 2103 | <section title="Keyword Independence">
|
2099 | 2104 | <t>
|
2100 | 2105 | Schema keywords typically operate independently, without
|
|
2112 | 2117 | "items", whose behavior is defined in terms of "prefixItems"
|
2113 | 2118 | </t>
|
2114 | 2119 | <t>
|
2115 |
| - "contains", whose behavior is defined in terms of "minContains" |
| 2120 | + "contains", whose behavior is affected by the presence and value of |
| 2121 | + "minContains", in the Validation vocabulary |
2116 | 2122 | </t>
|
2117 | 2123 | </list>
|
2118 | 2124 | </t>
|
|
2345 | 2351 | positions within the instance array, it produces an
|
2346 | 2352 | annotation result of boolean true, indicating that all remaining array
|
2347 | 2353 | elements have been evaluated against this keyword's subschema.
|
| 2354 | + This annotation affects the behavior of "unevaluatedItems" in the |
| 2355 | + Unevaluated vocabulary. |
2348 | 2356 | </t>
|
2349 | 2357 | <t>
|
2350 | 2358 | Omitting this keyword has the same assertion behavior as
|
|
2364 | 2372 | </t>
|
2365 | 2373 | <t>
|
2366 | 2374 | An array instance is valid against "contains" if at least one of
|
2367 |
| - its elements is valid against the given schema. The subschema MUST be |
2368 |
| - applied to every array element even after the first match has |
2369 |
| - been found, in order to collect annotations for use by other keywords. |
2370 |
| - This is to ensure that all possible annotations are collected. |
2371 |
| - </t> |
2372 |
| - <t> |
2373 |
| - Logically, the validation result of applying the value subschema to each |
2374 |
| - item in the array MUST be ORed with "false", resulting in an overall |
2375 |
| - validation result. |
| 2375 | + its elements is valid against the given schema, |
| 2376 | + except when "minContains" is present and has a value of 0, in which |
| 2377 | + case an array instance MUST be considered valid against the "contains" keyword, |
| 2378 | + even if none of its elements is valid against the given schema. |
2376 | 2379 | </t>
|
2377 | 2380 | <t>
|
2378 | 2381 | This keyword produces an annotation value which is an array of
|
|
2382 | 2385 | instance. The annotation MUST be present if the instance array to which
|
2383 | 2386 | this keyword's schema applies is empty.
|
2384 | 2387 | </t>
|
| 2388 | + <t> |
| 2389 | + This annotation affects the behavior of "unevaluatedItems" in the |
| 2390 | + Unevaluated vocabulary, and MAY also be used to implement the |
| 2391 | + "minContains" and "maxContains" keywords in the Validation vocabulary. |
| 2392 | + </t> |
| 2393 | + <t> |
| 2394 | + The subschema MUST be applied to every array element even after the first |
| 2395 | + match has been found, in order to collect annotations for use by other |
| 2396 | + keywords. This is to ensure that all possible annotations are collected. |
| 2397 | + </t> |
2385 | 2398 | </section>
|
2386 | 2399 | </section>
|
2387 | 2400 |
|
|
2400 | 2413 | <t>
|
2401 | 2414 | The annotation result of this keyword is the set of instance
|
2402 | 2415 | property names matched by this keyword.
|
| 2416 | + This annotation affects the behavior of "additionalProperties" (in |
| 2417 | + this vocabulary) and "unevaluatedProperties" in the Unevaluated vocabulary. |
2403 | 2418 | </t>
|
2404 | 2419 | <t>
|
2405 | 2420 | Omitting this keyword has the same assertion behavior as
|
|
2423 | 2438 | <t>
|
2424 | 2439 | The annotation result of this keyword is the set of instance
|
2425 | 2440 | property names matched by this keyword.
|
| 2441 | + This annotation affects the behavior of "additionalProperties" (in this |
| 2442 | + vocabulary) and "unevaluatedProperties" (in the Unevaluated vocabulary). |
2426 | 2443 | </t>
|
2427 | 2444 | <t>
|
2428 | 2445 | Omitting this keyword has the same assertion behavior as
|
|
2449 | 2466 | <t>
|
2450 | 2467 | The annotation result of this keyword is the set of instance
|
2451 | 2468 | property names validated by this keyword's subschema.
|
| 2469 | + This annotation affects the behavior of "unevaluatedProperties" |
| 2470 | + in the Unevaluated vocabulary. |
2452 | 2471 | </t>
|
2453 | 2472 | <t>
|
2454 | 2473 | Omitting this keyword has the same assertion behavior as
|
|
2524 | 2543 | The current URI for the corresponding meta-schema is:
|
2525 | 2544 | <eref target="https://json-schema.org/draft/2020-12/meta/unevaluated"/>.
|
2526 | 2545 | </t>
|
2527 |
| - <t> |
2528 |
| - Updated vocabulary and meta-schema URIs MAY be published between |
2529 |
| - specification drafts in order to correct errors. Implementations |
2530 |
| - SHOULD consider URIs dated after this specification draft and |
2531 |
| - before the next to indicate the same syntax and semantics |
2532 |
| - as those listed here. |
2533 |
| - </t> |
2534 | 2546 |
|
2535 | 2547 | <section title="Keyword Independence">
|
2536 | 2548 | <t>
|
|
2586 | 2598 | positions within the instance array, it produces an
|
2587 | 2599 | annotation result of boolean true, analogous to the
|
2588 | 2600 | behavior of "items".
|
| 2601 | + This annotation affects the behavior of "unevaluatedItems" in parent schemas. |
2589 | 2602 | </t>
|
2590 | 2603 | <t>
|
2591 | 2604 | Omitting this keyword has the same assertion behavior as
|
|
2629 | 2642 | <t>
|
2630 | 2643 | The annotation result of this keyword is the set of instance
|
2631 | 2644 | property names validated by this keyword's subschema.
|
| 2645 | + This annotation affects the behavior of "unevaluatedProperties" in parent schemas. |
2632 | 2646 | </t>
|
2633 | 2647 | <t>
|
2634 | 2648 | Omitting this keyword has the same assertion behavior as
|
@@ -3148,20 +3162,6 @@ https://example.com/schemas/common#/$defs/count/minimum
|
3148 | 3162 | <t>Type name: application</t>
|
3149 | 3163 | <t>Subtype name: schema+json</t>
|
3150 | 3164 | <t>Required parameters: N/A</t>
|
3151 |
| - <t> |
3152 |
| - Optional parameters: |
3153 |
| - <list style="hanging"> |
3154 |
| - <t hangText="schema:"> |
3155 |
| - A non-empty list of space-separated URIs, each identifying |
3156 |
| - a JSON Schema resource. The instance SHOULD successfully |
3157 |
| - validate against at least one of these meta-schemas. |
3158 |
| - Non-validating meta-schemas MAY be included for purposes such |
3159 |
| - as allowing clients to make use of older versions of |
3160 |
| - a meta-schema as long as the runtime instance validates |
3161 |
| - against that older version. |
3162 |
| - </t> |
3163 |
| - </list> |
3164 |
| - </t> |
3165 | 3165 | <t>
|
3166 | 3166 | Encoding considerations: Encoding considerations are
|
3167 | 3167 | identical to those specified for the "application/json"
|
@@ -3192,20 +3192,7 @@ https://example.com/schemas/common#/$defs/count/minimum
|
3192 | 3192 | <list>
|
3193 | 3193 | <t>Type name: application</t>
|
3194 | 3194 | <t>Subtype name: schema-instance+json</t>
|
3195 |
| - <t> |
3196 |
| - Required parameters: |
3197 |
| - <list style="hanging"> |
3198 |
| - <t hangText="schema:"> |
3199 |
| - A non-empty list of space-separated URIs, each identifying |
3200 |
| - a JSON Schema resource. The instance SHOULD successfully |
3201 |
| - validate against at least one of these schemas. |
3202 |
| - Non-validating schemas MAY be included for purposes such |
3203 |
| - as allowing clients to make use of older versions of a schema |
3204 |
| - as long as the runtime instance validates against that |
3205 |
| - older version. |
3206 |
| - </t> |
3207 |
| - </list> |
3208 |
| - </t> |
| 3195 | + <t>Required parameters: N/A</t> |
3209 | 3196 | <t>
|
3210 | 3197 | Encoding considerations: Encoding considerations are
|
3211 | 3198 | identical to those specified for the "application/json"
|
@@ -3435,6 +3422,18 @@ https://example.com/schemas/common#/$defs/count/minimum
|
3435 | 3422 | </t>
|
3436 | 3423 | </list>
|
3437 | 3424 | </t>
|
| 3425 | + <t> |
| 3426 | + Note: The fragment part of the URI does not make it canonical or non-canonical, |
| 3427 | + rather, the base URI used (as part of the full URI with any fragment) is what |
| 3428 | + determines the canonical nature of the resulting full URI. |
| 3429 | + <cref> |
| 3430 | + Multiple "canonical" URIs? We Acknowledge this is potentially confusing, and |
| 3431 | + direct you to read the CREF located in the |
| 3432 | + <xref target="embedded">JSON Pointer fragments and embedded schema resources</xref> |
| 3433 | + section for futher comments. |
| 3434 | + </cref> |
| 3435 | + </t> |
| 3436 | + |
3438 | 3437 | </section>
|
3439 | 3438 |
|
3440 | 3439 | <section title="Manipulating schema documents and references">
|
@@ -3706,7 +3705,7 @@ https://example.com/schemas/common#/$defs/count/minimum
|
3706 | 3705 | {"$ref": "https://json-schema.org/draft/2020-12/meta/core"},
|
3707 | 3706 | {"$ref": "https://json-schema.org/draft/2020-12/meta/applicator"},
|
3708 | 3707 | {"$ref": "https://json-schema.org/draft/2020-12/meta/validation"},
|
3709 |
| - {"$ref": "https://example.com/meta/example-vocab", |
| 3708 | + {"$ref": "https://example.com/meta/example-vocab"} |
3710 | 3709 | ],
|
3711 | 3710 | "patternProperties": {
|
3712 | 3711 | "^unevaluated": false
|
@@ -3873,8 +3872,8 @@ https://example.com/schemas/common#/$defs/count/minimum
|
3873 | 3872 | <t>"$schema" MAY change for embedded resources</t>
|
3874 | 3873 | <t>Array-value "items" functionality is now "prefixItems"</t>
|
3875 | 3874 | <t>"items" subsumes the old function of "additionalItems"</t>
|
3876 |
| - <t>"contains" and "unevaluatedItems" interactions now specified</t> |
3877 |
| - <t>Rename $recursive* to $dynamic*</t> |
| 3875 | + <t>"contains" annotation behavior, and "contains" and "unevaluatedItems" interactions now specified</t> |
| 3876 | + <t>Rename $recursive* to $dynamic*, with behavior modification</t> |
3878 | 3877 | <t>$dynamicAnchor defines a fragment like $anchor</t>
|
3879 | 3878 | <t>$dynamic* (previously $recursive) no longer use runtime base URI determination</t>
|
3880 | 3879 | <t>Define Compound Schema Documents (bundle) and processing</t>
|
|
0 commit comments