laravel-jsonapi
laravel-jsonapi copied to clipboard
POST and PUT request not using `attributes`
I just wanted to double check how a typical POST/PUT request should look like for this lib to work.
It seems you don't expect the attributes to be placed within the attributes
element like below. Instead you expect the attributes simply inside data. This is easy enough to change (inside Handler->parseRequestContent()) - was there a reason why its done this way? Am i missing something?
{
"data": {
"type": "resource",
"id": "
The spec follows what I've done above: http://jsonapi.org/format/#crud
Thanks mate,
Yes, there's a specific reason. That reason being that this library was build initially for a previous version of the JSON API spec—RC3 if I recall correctly.
Feel free to do a pull request, as the goal should be for this library to be v1 compliant.