Skip to content

"method" does not constrain HTTP methods #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions jsonschema-hyperschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ GET /foo/
</t>
</section>

<section title="targetSchema">
<section title="targetSchema" anchor="targetSchema">
<t>
This property provides a schema that is expected to describe the link target, including what a client can expect if it makes an HTTP GET request, and what it should send if it replaces the resource in an HTTP PUT request. This property is advisory only.
</t>
Expand Down Expand Up @@ -855,11 +855,20 @@ GET /foo/
This property specifies that the client can construct a templated query or non-idempotent request to a resource.
</t>
<t>
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.
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.
</t>
<t>
If "method" is "post", the link specifies how a user can construct a document to submit to the link target for evaluation.
</t>
<t>
Despite being named after HTTP's GET and POST, the presence,
absence, or value of this keyword does not impose any constraints
on either the method or protocol used to interact with the remote resource.
In particular, the same Link Description Object may be used
for multiple protocol methods. For protocol methods whose
request format is described by <xref target="targetSchema">"targetSchema"</xref>,
if "method" is "post" then <xref target="schema">"schema"</xref> is ignored.
</t>
<t>
Values for this property SHOULD be lowercase, and SHOULD be compared case-insensitive. Use of other values not defined here SHOULD be ignored.
</t>
Expand Down Expand Up @@ -915,7 +924,7 @@ GET /foo/
</t>

<t>
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.
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.
</t>
</section>
</section>
Expand Down