Skip to content

Commit 5eda485

Browse files
committed
Remove media type parameters
Not convinced it was used and there are outstanding questions we should look to resolve should they be re-added. I understand they were mainly for use with HyperSchema, although I can see utility if they are well and clearly defined. Look at #832 should they want to be re-added.
1 parent 78aacf6 commit 5eda485

File tree

1 file changed

+3
-112
lines changed

1 file changed

+3
-112
lines changed

jsonschema-core.xml

+3-112
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@
208208
</t>
209209
<t>
210210
Among these, this specification defines the "application/schema-instance+json"
211-
media type which defines handling for fragments in the URI,
212-
and the "schema" media type parameter.
211+
media type which defines handling for fragments in the URI.
213212
</t>
214213

215214
<section title="Instance Data Model">
@@ -305,7 +304,7 @@
305304
A schema can itself be interpreted as an instance, but SHOULD always be given
306305
the media type "application/schema+json" rather than
307306
"application/schema-instance+json". The "application/schema+json" media
308-
type is defined to offer a superset of the media type parameter and
307+
type is defined to offer a superset of the
309308
fragment identifier syntax and semantics provided by
310309
"application/schema-instance+json".
311310
</t>
@@ -2007,114 +2006,6 @@
20072006

20082007
</section>
20092008

2010-
2011-
<section title='Identifying a Schema via a Media Type Parameter' anchor="parameter">
2012-
<t>
2013-
Media types MAY allow for a "schema" media type parameter, which gives
2014-
HTTP servers the ability to perform Content-Type Negotiation based on schema.
2015-
The media-type parameter MUST be a whitespace-separated list of URIs
2016-
(i.e. relative references are invalid).
2017-
</t>
2018-
<t>
2019-
When using the media type application/schema-instance+json, the "schema"
2020-
parameter MUST be supplied.
2021-
</t>
2022-
<t>
2023-
When using the media type application/schema+json, the "schema" parameter
2024-
MAY be supplied. If supplied, it SHOULD contain the same URI as identified
2025-
by the "$schema" keyword, and MAY contain additional URIs. The "$schema"
2026-
URI MUST be considered the schema's canonical meta-schema, regardless
2027-
of the presence of alternative or additional meta-schemas as a media type
2028-
parameter.
2029-
</t>
2030-
<t>
2031-
The schema URI is opaque and SHOULD NOT automatically be dereferenced.
2032-
If the implementation does not understand the semantics of the provided schema,
2033-
the implementation can instead follow the "describedby" links, if any, which may
2034-
provide information on how to handle the schema.
2035-
Since "schema" doesn't necessarily point to a network location, the
2036-
"describedby" relation is used for linking to a downloadable schema.
2037-
However, for simplicity, schema authors should make these URIs point to the same
2038-
resource when possible.
2039-
</t>
2040-
2041-
<t>
2042-
In HTTP, the media-type parameter would be sent inside the Content-Type header:
2043-
</t>
2044-
2045-
<figure>
2046-
<artwork>
2047-
<![CDATA[
2048-
Content-Type: application/schema-instance+json;
2049-
schema="https://example.com/my-hyper-schema"
2050-
]]>
2051-
</artwork>
2052-
</figure>
2053-
2054-
<t>
2055-
Multiple schemas are whitespace separated, and indicate that the
2056-
instance conforms to all of the listed schemas:
2057-
</t>
2058-
2059-
<figure>
2060-
<artwork>
2061-
<![CDATA[
2062-
Content-Type: application/schema-instance+json;
2063-
schema="https://example.com/alice https://example.com/bob"
2064-
]]>
2065-
</artwork>
2066-
</figure>
2067-
2068-
<t>
2069-
Media type parameters are also used in HTTP's Accept request header:
2070-
</t>
2071-
2072-
<figure>
2073-
<artwork>
2074-
<![CDATA[
2075-
Accept: application/schema-instance+json;
2076-
schema="https://example.com/qiang https://example.com/li",
2077-
application/schema-instance+json;
2078-
schema="https://example.com/kumar"
2079-
]]>
2080-
</artwork>
2081-
</figure>
2082-
2083-
<t>
2084-
As with Content-Type, multiple schema parameters in the same string
2085-
requests an instance that conforms to all of the listed schemas.
2086-
</t>
2087-
2088-
<t>
2089-
Unlike Content-Type, Accept can contain multiple values to
2090-
indicate that the client can accept several media types.
2091-
In the above example, note that the two media types differ
2092-
only by their schema parameter values. This requests an
2093-
application/schema-instance+json representation that conforms to at least one
2094-
of the identified schemas.
2095-
</t>
2096-
2097-
<t>
2098-
<cref>
2099-
This paragraph assumes that we can register a "schema" link relation.
2100-
Should we instead specify something like "tag:json-schema.org,2017:schema"
2101-
for now?
2102-
</cref>
2103-
HTTP can also send the "schema" in a Link, though this may impact media-type
2104-
semantics and Content-Type negotiation if this replaces the media-type parameter
2105-
entirely:
2106-
</t>
2107-
2108-
<figure>
2109-
<artwork>
2110-
<![CDATA[
2111-
Link: </alice>;rel="schema", </bob>;rel="schema"
2112-
]]>
2113-
</artwork>
2114-
</figure>
2115-
2116-
</section>
2117-
21182009
<section title="Usage Over HTTP">
21192010
<t>
21202011
When used for hypermedia systems over a network,
@@ -3954,7 +3845,7 @@ https://example.com/schemas/common#/$defs/count/minimum
39543845
<t>$dynamic* (previously $recursive) no longer use runtime base URI determination</t>
39553846
<t>Define Compound Schema Documents (bundle) and processing</t>
39563847
<t>Reference ECMA-262, 11th edition for regular expression support</t>
3957-
<t></t>
3848+
<t>Remove media type parameters</t>
39583849
<t></t>
39593850
<t></t>
39603851
</list>

0 commit comments

Comments
 (0)