If my response has relationships with an array of relationship identifiers is there an expectation that those same identifiers should be found in the included member? That seems to me to be the only way a {“type”: “foo”,“id”: “abc”} relationship data member could resolve to a resource without making an assumption about how resource URLs are formed? In my first (ten) readings of the spec it seems like I can have a relationships.relname.data member without an included member but that seems wrong:
links:
self: /widgets/abc-123
data:
type: widgets
id: "abc-123"
attributes:
name: "can opener"
qty: 47
relationships:
location:
data:
- type: locations
id: "1234"
- type: locations
id: "1235"
links:
self: /widgets/abc-123/relationships/location
Do I need to make sure there’s also an included member as a means of resolving those resource identifier objects?
included:
- type: locations
id: "1234"
attributes:
warehouse: Briarcliff Manor
aisle: "45"
shelf: "33"
bin: "1"
links:
self: /locations/1234
- type: locations
id: "1235"
attributes:
warehouse: NYC
aisle: "4"
shelf: "3"
bin: "11"
links:
self: /locations/1235
Thanks in advance.