Skip to content

Commit e721f6a

Browse files
committed
Clarify non-HTTP usage in generic terms.
Add some wording about request formats being defined in terms of the target representation or not. This should provide more guidance for when "method": "post" and "schema" are relevant, independent of URI scheme.
1 parent 2a89dbf commit e721f6a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

jsonschema-hyperschema.xml

+12-3
Original file line numberDiff line numberDiff line change
@@ -873,18 +873,25 @@ GET /foo/
873873
This property specifies that the client can construct a templated query or non-idempotent request to a resource.
874874
</t>
875875
<t>
876-
If "method" is "get", the link identifies how a user can compute the URI of an arbitrary resource. For example, how to compute a link to a page of search results relating to the instance, for a user-selected query term.
876+
If "method" is "get", the link identifies how a user can compute the URI of an arbitrary resource.
877+
For example, how to compute a link to a page of search results relating to the instance, for a user-selected query term.
878+
Note that <xref target="hrefSchema">"hrefSchema"</xref> offers a superset
879+
of this functionality independent of the value of "method".
877880
</t>
878881
<t>
879-
If "method" is "post", the link specifies how a user can construct a document to submit to the link target for evaluation.
882+
If "method" is "post", the link specifies how a user can construct
883+
a document to submit to the link target for evaluation.
884+
This option is used for requests requiring a payload that is not described
885+
in terms of the target representation, since the target
886+
representation is described by <xref target="targetSchema">"targetSchema"</xref>.
880887
</t>
881888
<t>
882889
Despite being named after HTTP's GET and POST, the presence,
883890
absence, or value of this keyword does not impose any constraints
884891
on either the method or protocol used to interact with the remote resource.
885892
In particular, the same Link Description Object may be used
886893
for multiple protocol methods. For protocol methods whose
887-
request format is described by <xref target="targetSchema">"targetSchema"</xref>,
894+
request format is based on the target representation,
888895
if "method" is "post" then <xref target="schema">"schema"</xref> is ignored.
889896
</t>
890897
<t>
@@ -943,6 +950,8 @@ GET /foo/
943950

944951
<t>
945952
This is a separate concept from the <xref target="targetSchema">"targetSchema"</xref> property, which is describing the target information resource (including for replacing the contents of the resource in a PUT request), unlike "schema" which describes the user-submitted request data to be evaluated by the resource.
953+
"schema" is intended for use with requests that have payloads that are not
954+
defined in terms of the target representation.
946955
</t>
947956
</section>
948957
</section>

0 commit comments

Comments
 (0)