Skip to content

Commit 9bf78da

Browse files
authored
Merge pull request #684 from handrews/media-param
Allow "schema" media type parameter for schemas
2 parents 8cb49ba + 1413df4 commit 9bf78da

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Diff for: jsonschema-core.xml

+23-1
Original file line numberDiff line numberDiff line change
@@ -2153,6 +2153,14 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedby"
21532153
When using the media type application/schema-instance+json, the "schema"
21542154
parameter MUST be supplied.
21552155
</t>
2156+
<t>
2157+
When using the media type application/schema+json, the "schema" parameter
2158+
MAY be supplied, If supplied, it SHOULD contain the same URI as identified
2159+
by the "$schema" keyword, and MAY contain additional URIs. The "$schema"
2160+
URI MUST be considered the schema's canonical meta-schema, regardless
2161+
of the presence of alternative or additional meta-schemas as a media type
2162+
parameter.
2163+
</t>
21562164
<t>
21572165
The schema URI is opaque and SHOULD NOT automatically be dereferenced.
21582166
If the implementation does not understand the semantics of the provided schema,
@@ -2287,7 +2295,21 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
22872295
<list>
22882296
<t>Type name: application</t>
22892297
<t>Subtype name: schema+json</t>
2290-
<t>Required parameters: N/A</t>
2298+
<t>>Required parameters: N/A</t>
2299+
<t>
2300+
Optional parameters:
2301+
<list style="hanging">
2302+
<t hangText="schema:">
2303+
A non-empty list of space-separated URIs, each identifying
2304+
a JSON Schema resource. The instance SHOULD successfully
2305+
validate against at least one of these meta-schemas.
2306+
Non-validating meta-schemas MAY be included for purposes such
2307+
as allowing clients to make use of older versions of
2308+
a meta-schema as long as the runtime instance validates
2309+
against that older version.
2310+
</t>
2311+
</list>
2312+
</t>
22912313
<t>
22922314
Encoding considerations: Encoding considerations are
22932315
identical to those specified for the "application/json"

0 commit comments

Comments
 (0)