@@ -114,6 +114,8 @@ The top-level [links object][links] **MAY** contain the following members:
114
114
resource relationship.
115
115
* ` profile ` : an array of [ links] [ link ] , each specifying a [ profile] [ profiles ]
116
116
in use in the document.
117
+ * ` describedby ` : a [ link] to a description document (e.g. OpenAPI or JSON
118
+ Schema) for the current document.
117
119
* [ pagination] links for the primary data.
118
120
119
121
The document's "primary data" is a representation of the resource or collection
@@ -538,6 +540,8 @@ Within this object, a link **MUST** be represented as either:
538
540
[ relationship object] [ relationships ] in which the link appears.
539
541
* ` params ` : a [ link parameter object] [ link parameters ] describing additional
540
542
information about the link or its target.
543
+ * ` describedby ` : a [ link] to a description document (e.g. OpenAPI or JSON
544
+ Schema) for the link target.
541
545
* ` meta ` : a meta object containing non-standard meta-information about the
542
546
link.
543
547
@@ -552,13 +556,15 @@ key in an [error object]'s links object, each key present in a links object
552
556
553
557
In the example below, the ` self ` link is simply a URI string, whereas the
554
558
` related ` link uses the object form to provide meta information about a
555
- related resource collection:
559
+ related resource collection as well as a schema that serves as a description
560
+ document for that collection:
556
561
557
562
``` json
558
563
"links" : {
559
- "self" : " http://example.com/articles/1" ,
564
+ "self" : " http://example.com/articles/1/relationships/comments " ,
560
565
"related" : {
561
566
"href" : " http://example.com/articles/1/comments" ,
567
+ "describedby" : " http://example.com/schemas/article-comments" ,
562
568
"meta" : {
563
569
"count" : 10
564
570
}
0 commit comments