FriendsOfCake / crud-json-api

Build advanced JSON API Servers with almost no code.
https://crud-json-api.readthedocs.io/
MIT License
56 stars 32 forks source link

Does not meet the 1.0 spec for POST relationship #118

Closed geoidesic closed 4 years ago

geoidesic commented 4 years ago

This part of the spec: https://jsonapi.org/format/1.1/#crud-updating-to-many-relationships stipulates:

If a client makes a POST request to a URL from a relationship link, the server MUST add the specified members to the relationship unless they are already present. If a given type and id is already in the relationship, the server MUST NOT add it again.

Currently this does not work, it treats such requests as a PATCH request and will replace all of the relationships instead of adding to them.

geoidesic commented 4 years ago

Fixed by recent commit: https://github.com/FriendsOfCake/crud-json-api/commit/3bdfe0a6e87c3819490175ef1def1ca74cf4d7d0