Skip to content

Commit 2a89dbf

Browse files
committed
"method" does not constrain HTTP methods
"method" already documented that "method": "get" does not constrain the LDO to GET. Clarify that "post" also does not constrain the LDO to HTTP POST, and that the LDO can be used with multiple methods. The "schema" and "targetSchema" keywords are used with relevant HTTP methods regardless of the presence, absence, or value of JSON Hyper-Schema LDO "method". This is consistent with the existing wording of both "schema" and "targetSchema" around the construction of PUT requests.
1 parent d3c75a8 commit 2a89dbf

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

jsonschema-hyperschema.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ GET /foo/
702702
</t>
703703
</section>
704704

705-
<section title="targetSchema">
705+
<section title="targetSchema" anchor="targetSchema">
706706
<t>
707707
This property provides a schema that is expected to describe
708708
the link target's representation. Depending on the protocol,
@@ -873,11 +873,20 @@ 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. Despite being named after GET, there is no constraint on the method or protocol used to interact with the remote resource.
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.
877877
</t>
878878
<t>
879879
If "method" is "post", the link specifies how a user can construct a document to submit to the link target for evaluation.
880880
</t>
881+
<t>
882+
Despite being named after HTTP's GET and POST, the presence,
883+
absence, or value of this keyword does not impose any constraints
884+
on either the method or protocol used to interact with the remote resource.
885+
In particular, the same Link Description Object may be used
886+
for multiple protocol methods. For protocol methods whose
887+
request format is described by <xref target="targetSchema">"targetSchema"</xref>,
888+
if "method" is "post" then <xref target="schema">"schema"</xref> is ignored.
889+
</t>
881890
<t>
882891
Values for this property SHOULD be lowercase, and SHOULD be compared case-insensitive. Use of other values not defined here SHOULD be ignored.
883892
</t>
@@ -933,7 +942,7 @@ GET /foo/
933942
</t>
934943

935944
<t>
936-
This is a separate concept from the "targetSchema" 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.
945+
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.
937946
</t>
938947
</section>
939948
</section>

0 commit comments

Comments
 (0)