nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
71 stars 35 forks source link

Do not remove ID from attributes #65

Closed nilportugues closed 8 years ago

nilportugues commented 8 years ago

While i originally decided to remove it as it is already available as in the standard

After some discussing in https://github.com/nilportugues/laravel5-jsonapi/pull/75#issuecomment-229496366 users asked for to be included as standard says nothing about this, which is true.

nilportugues commented 8 years ago

https://github.com/nilportugues/php-json-api/commit/63aa731a45835a96d07cd350f5fd270d876a69a2

plattarsu commented 7 years ago

If ID is not removed from attributes, I can't PUT/PATCH data by sending the returned data. I'll need to delete ID from returned data and then send PUT/PATCH request to my api. This is not a big thing to do but it doesn't looks right. If we're following this, is there any way to make request with ID in attributes?