Skip to content

Commit 1413df4

Browse files
committed
Allow "schema" media type parameter for schemas
application/schema+json MAY use the same mechanism as application/schema-instance+json to identify its meta-schema, although with application/schema+json, the "$schema" value within the document is considered the canonical meta-schema.
1 parent 7401514 commit 1413df4

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

jsonschema-core.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,14 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedby"
21382138
When using the media type application/schema-instance+json, the "schema"
21392139
parameter MUST be supplied.
21402140
</t>
2141+
<t>
2142+
When using the media type application/schema+json, the "schema" parameter
2143+
MAY be supplied, If supplied, it SHOULD contain the same URI as identified
2144+
by the "$schema" keyword, and MAY contain additional URIs. The "$schema"
2145+
URI MUST be considered the schema's canonical meta-schema, regardless
2146+
of the presence of alternative or additional meta-schemas as a media type
2147+
parameter.
2148+
</t>
21412149
<t>
21422150
The schema URI is opaque and SHOULD NOT automatically be dereferenced.
21432151
If the implementation does not understand the semantics of the provided schema,
@@ -2272,7 +2280,21 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
22722280
<list>
22732281
<t>Type name: application</t>
22742282
<t>Subtype name: schema+json</t>
2275-
<t>Required parameters: N/A</t>
2283+
<t>>Required parameters: N/A</t>
2284+
<t>
2285+
Optional parameters:
2286+
<list style="hanging">
2287+
<t hangText="schema:">
2288+
A non-empty list of space-separated URIs, each identifying
2289+
a JSON Schema resource. The instance SHOULD successfully
2290+
validate against at least one of these meta-schemas.
2291+
Non-validating meta-schemas MAY be included for purposes such
2292+
as allowing clients to make use of older versions of
2293+
a meta-schema as long as the runtime instance validates
2294+
against that older version.
2295+
</t>
2296+
</list>
2297+
</t>
22762298
<t>
22772299
Encoding considerations: Encoding considerations are
22782300
identical to those specified for the "application/json"

0 commit comments

Comments
 (0)