Clarification: non-compound documents and resource linkages


#1

There’s a similar question where the question is about whether resource-linkages are required in non-compound documents.

I am wondering whether in non-compound documents relationships are allowed to contain a resource linkage or not.
In my opinion the specification does not answer this question clearly:

Resource linkage in a compound document allows a client to link together all of the included resource objects without having to GET any URLs via links.

Resource linkages are only mentioned in conjunction with “compound documents”.

So my question is:
If a relationship object contains a resource linkage (i.e. "data": { "id": "123", "type": "mytype" }) does it imply that there must also be a matching resource object in the included array?


Belongs-to in microservices
#2

No. If you look in the spec examples themselves you’ll see the to-many example returns a link where the data fields are not resolved with an included section.

I agree this may be another gap where the specification could have been more clear on the expectation, but it is clearly intentional in the examples this is allowed.