Open Insolita opened 3 years ago
How are you creating the serializer? If you create the serializer without a base URL, it shouldn't add the links.
Regarding the attributes, that's a tricky one which comes from the current implementation not being able to difrentiate between an empty object and an empty array, there are issues raised about this problem already and the changes required would essentially mean rebuilding the serializer from scratch. In theory, an empty object should not be there, but an empty array should be, so the API consumer knows that there is potentially an amount of items to be iterated over.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you for your contributions.
Even if we transform data as
the response will contain empty attributes object and link object with self-link like
There is no way to receive a simple response for request like /articles/1/relationships/author r like in examples https://jsonapi.org/format/#fetching-relationships