Closed sevenseacat closed 5 months ago
Alright, so this one was primarily a documentation issue. I've added a very high level guide for this, as I'm a bit low on time today. It does, however, explain that links are generated from primary?
routes. So to have your links generated, you'd want to designate the appropriate routes as primary? true
I didn't even know that was an option! cheers 👍
Describe the bug
The example for compound documents and relationships in the JSON:API docs show that we should be providing links for how to fetch related data, if they exist.
eg.
relationship
route should appear as aself
route in the linksrelated
route should appear as arelated
route in the linksThis is important for discoverability of relationships in the API.
To Reproduce
For an
Artist
resource defined like so:An API response to get an artist returns the following relationship data:
Expected behavior
I would expect the
links
in the relationship data to include arelated
link like:In a similar/related vein, I'd expect the
links
forincluded
resources to be populated withself
links.Runtime