|
10 | 10 | <!ENTITY rfc5988 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5988.xml">
|
11 | 11 | <!ENTITY rfc6570 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6570.xml">
|
12 | 12 | <!ENTITY rfc7231 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7231.xml">
|
| 13 | +<!ENTITY I-D.reschke-http-jfv SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-reschke-http-jfv-06.xml"> |
13 | 14 | ]>
|
14 | 15 | <?rfc toc="yes"?>
|
15 | 16 | <?rfc symrefs="yes"?>
|
@@ -974,6 +975,86 @@ GET /foo/
|
974 | 975 | </section>
|
975 | 976 | </section>
|
976 | 977 |
|
| 978 | + <section title="targetHints" anchor="targetHints"> |
| 979 | + <t> |
| 980 | + <cref> |
| 981 | + This section attempts to strike a balance between comprehensiveness |
| 982 | + and flexibility by deferring most of its structure to the protocol |
| 983 | + indicated by the URI scheme. Note that a resource can be identified |
| 984 | + by a URI with a dereferenceable scheme, yet not be accessible over |
| 985 | + that protocol. While currently very loose, this section is expected |
| 986 | + to become more well-defined based on draft feedback, and may change |
| 987 | + significantly in future drafts. |
| 988 | + </cref> |
| 989 | + </t> |
| 990 | + <t> |
| 991 | + The value of this property is advisory only. It represents information that |
| 992 | + is expected to be discoverable through interacting with the target resource, |
| 993 | + typically in the form of protocol-specific control information or meta-data |
| 994 | + such as headers returned in response to an HTTP HEAD or OPTIONS request. |
| 995 | + The protocol is determined by the "href" URI scheme, although note that |
| 996 | + resources are not guaranteed to be accessible over such a protocol. |
| 997 | + </t> |
| 998 | + <t> |
| 999 | + The value of this property SHOULD be an object. The keys to this object |
| 1000 | + SHOULD be lower-cased forms of the control data field names. Each value |
| 1001 | + SHOULD be an array, in order to uniformly handle multi-valued fields. |
| 1002 | + Multiple values MUST be presented as an array, and not as a single string. |
| 1003 | + </t> |
| 1004 | + <t> |
| 1005 | + Protocols with control information not suitable for representation as |
| 1006 | + a JSON object MAY be represented by another data type, such as an array. |
| 1007 | + </t> |
| 1008 | + <t> |
| 1009 | + Values that cannot be understood as part of the indicated protocol MUST |
| 1010 | + be ignored by a JSON Hyper-Schema implementation. Applications MAY make |
| 1011 | + use of such values, but MUST NOT assume interoperability with other |
| 1012 | + implementations. |
| 1013 | + </t> |
| 1014 | + <t> |
| 1015 | + Implementations MUST NOT assume that all discoverable information is |
| 1016 | + accounted for in this object. Clients MUST properly handle run-time responses |
| 1017 | + that contradict this property's values. |
| 1018 | + </t> |
| 1019 | + <t> |
| 1020 | + Clients MUST NOT assume that an implementation will automatically take any |
| 1021 | + action based on the value of this property. |
| 1022 | + </t> |
| 1023 | + <section title='"targetHints for HTTP"'> |
| 1024 | + <t> |
| 1025 | + JSON serializations of HTTP response header information SHOULD follow the |
| 1026 | + guidelines established by the work in progress |
| 1027 | + <xref target="I-D.reschke-http-jfv">"A JSON Encoding for HTTP Header Field Values"</xref>. |
| 1028 | + Approaches shown in that document's examples SHOULD be applied to other |
| 1029 | + similarly structured headers wherever possible. |
| 1030 | + </t> |
| 1031 | + <t> |
| 1032 | + No distinction is made between headers that may appear in responses to |
| 1033 | + different methods, such as HEAD vs OPTIONS. |
| 1034 | + </t> |
| 1035 | + <figure> |
| 1036 | + <preamble> |
| 1037 | + This examples shows several hints that are useful for clients |
| 1038 | + when determining what requests to make and how to make them. |
| 1039 | + </preamble> |
| 1040 | + <artwork> |
| 1041 | +<![CDATA[{ |
| 1042 | + "targetHints": { |
| 1043 | + "allow": ["GET", "PUT"], |
| 1044 | + "accept-patch": ["application/merge-patch+json"], |
| 1045 | + "accept-ranges": ["none"] |
| 1046 | + } |
| 1047 | +}]]> |
| 1048 | + </artwork> |
| 1049 | + </figure> |
| 1050 | + </section> |
| 1051 | + <section title='"targetHints for CoAP"'> |
| 1052 | + <t> |
| 1053 | + <cref>TBD</cref> |
| 1054 | + </t> |
| 1055 | + </section> |
| 1056 | + </section> |
| 1057 | + |
977 | 1058 | <section title="mediaType">
|
978 | 1059 | <t>
|
979 | 1060 | The value of this property is advisory only, and represents the media type
|
@@ -1005,7 +1086,8 @@ GET /foo/
|
1005 | 1086 |
|
1006 | 1087 | <t>
|
1007 | 1088 | If this property's value is not specified, then the value should be taken to be
|
1008 |
| - "application/json". |
| 1089 | + "application/json". Hyper-Schema authors SHOULD NOT use a protocol-specific |
| 1090 | + value in <xref target="targetHints">"targetHints"</xref> for this purpose. |
1009 | 1091 | </t>
|
1010 | 1092 |
|
1011 | 1093 | <figure>
|
@@ -1181,6 +1263,7 @@ GET /foo/
|
1181 | 1263 | &rfc3986;
|
1182 | 1264 | <!--&rfc4287;-->
|
1183 | 1265 | &rfc6570;
|
| 1266 | + &I-D.reschke-http-jfv; |
1184 | 1267 | <reference anchor="json-schema">
|
1185 | 1268 | <front>
|
1186 | 1269 | <title>JSON Schema: A Media Type for Describing JSON Documents</title>
|
|
0 commit comments