Skip to content

Commit cb53907

Browse files
authored
Merge pull request #414 from handrews/hyperlink
Minimal change from "profile" to "schema"
2 parents e53bb44 + f0864ab commit cb53907

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

jsonschema-core.xml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<!ENTITY RFC5988 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5988.xml">
66
<!ENTITY RFC6839 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6839.xml">
77
<!ENTITY RFC6901 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6901.xml">
8-
<!ENTITY RFC6906 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6906.xml">
98
<!ENTITY RFC7049 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7049.xml">
109
<!ENTITY RFC7159 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7159.xml">
1110
<!ENTITY RFC7231 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7231.xml">
@@ -675,7 +674,7 @@
675674

676675
<section title='Linking to a schema'>
677676
<t>
678-
It is RECOMMENDED that instances described by a schema/profile provide a link to
677+
It is RECOMMENDED that instances described by a schema provide a link to
679678
a downloadable JSON Schema using the link relation "describedby", as defined by
680679
<xref target="W3C.REC-ldp-20150226">Linked Data Protocol 1.0, section 8.1</xref>.
681680
</t>
@@ -696,21 +695,23 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedby"
696695
</section>
697696

698697

699-
<section title='Describing a profile of JSON' anchor="profile">
698+
<section title='Identifying a schema via a media type parameter' anchor="parameter">
700699
<t>
701-
Instances MAY specify a "profile" as described in
702-
<xref target="RFC6906">The 'profile' Link Relation</xref>.
703-
When used as a media-type parameter, HTTP servers gain the ability to perform
704-
Content-Type Negotiation based on profile.
700+
Media types MAY allow for a "schema" media type parameter, which gives
701+
HTTP servers the ability to perform Content-Type Negotiation based on schema.
705702
The media-type parameter MUST be a whitespace-separated list of URIs
706703
(i.e. relative references are invalid).
707704
</t>
708705
<t>
709-
The profile URI is opaque and SHOULD NOT automatically be dereferenced.
710-
If the implementation does not understand the semantics of the provided profile,
706+
When using the media type application/schema-instance+json, the "schema"
707+
parameter MUST be supplied.
708+
</t>
709+
<t>
710+
The schema URI is opaque and SHOULD NOT automatically be dereferenced.
711+
If the implementation does not understand the semantics of the provided schema,
711712
the implementation can instead follow the "describedby" links, if any, which may
712-
provide information on how to handle the profile.
713-
Since "profile" doesn't necessarily point to a network ___location, the
713+
provide information on how to handle the schema.
714+
Since "schema" doesn't necessarily point to a network ___location, the
714715
"describedby" relation is used for linking to a downloadable schema.
715716
However, for simplicity, schema authors should make these URIs point to the same
716717
resource when possible.
@@ -724,34 +725,39 @@ Link: <http://example.com/my-hyper-schema#>; rel="describedby"
724725
<artwork>
725726
<![CDATA[
726727
Content-Type: application/json;
727-
profile="http://example.com/my-hyper-schema#"
728+
schema="http://example.com/my-hyper-schema#"
728729
]]>
729730
</artwork>
730731
</figure>
731732

732733
<t>
733-
Multiple profiles are whitespace separated:
734+
Multiple schemas are whitespace separated:
734735
</t>
735736

736737
<figure>
737738
<artwork>
738739
<![CDATA[
739740
Content-Type: application/json;
740-
profile="http://example.com/alice http://example.com/bob"
741+
schema="http://example.com/alice http://example.com/bob"
741742
]]>
742743
</artwork>
743744
</figure>
744745

745746
<t>
746-
HTTP can also send the "profile" in a Link, though this may impact media-type
747+
<cref>
748+
This paragraph assumes that we can register a "schema" link relation.
749+
Should we instead specify something like "tag:json-schema.org,2017:schema"
750+
for now?
751+
</cref>
752+
HTTP can also send the "schema" in a Link, though this may impact media-type
747753
semantics and Content-Type negotiation if this replaces the media-type parameter
748754
entirely:
749755
</t>
750756

751757
<figure>
752758
<artwork>
753759
<![CDATA[
754-
Link: </alice>;rel="profile", </bob>;rel="profile"
760+
Link: </alice>;rel="schema", </bob>;rel="schema"
755761
]]>
756762
</artwork>
757763
</figure>
@@ -915,7 +921,6 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
915921

916922
<references title="Informative References">
917923
&RFC5988;
918-
&RFC6906;
919924
&RFC7049;
920925
&RFC7231;
921926
&fragid-best-practices;

0 commit comments

Comments
 (0)