Skip to content

Commit cff699d

Browse files
committed
Wording changes
1 parent e379ca1 commit cff699d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

proposals/json-schema-hypermedia.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@
225225
</t>
226226
<figure>
227227
<preamble>
228-
For example, this schema describes a format for news posts, accessed via HTTP.
229-
The links describe how to access the comments for a news post, how to search the comments, and how to submit new comments, all with the same URI:</preamble>
228+
For example, this schema describes a format for blog posts, accessed via HTTP.
229+
The links describe how to access the comments for the post, how to search the comments, and how to submit new comments, all with the same URI:</preamble>
230230
<artwork>
231231
<![CDATA[{
232232
"title": "News post",
@@ -256,7 +256,8 @@
256256
}
257257
},
258258
{
259-
"rel": "post-comment",
259+
"title": "Post a comment",
260+
"rel": "create",
260261
"href": "/{id}/comments",
261262
"method": "POST",
262263
"schema": {
@@ -275,9 +276,16 @@
275276
</figure>
276277
<t>
277278
If the client follows the first link, the URI might be expanded to "/15/comments".
278-
For the second link, the method is "GET" (the default for HTTP) so the parameters are added to the URL to produce something like: "/15/comments?searchTerm=JSON&itemsPerPage=50".
279-
The third link might have a URI of "/15/comments", but the text content of the new comment is posted as JSON.
279+
For the second link, the method is "GET" (the default for HTTP) so a client following this link would add the parameters to the URL to produce something like: "/15/comments?searchTerm=JSON&amp;itemsPerPage=50".
280+
The third link defines a possible interaction where a client would POST to a URI (such as "/15/comments"), where the post-data was a JSON representation of the new comment, for example:
280281
</t>
282+
<figure>
283+
<artwork>
284+
<![CDATA[{
285+
"message": "This is an example comment"
286+
}]]>
287+
</artwork>
288+
</figure>
281289
</section>
282290
</section>
283291

0 commit comments

Comments
 (0)