egeriis / laravel-jsonapi

Make it a breeze to create a jsonapi.org compliant APIs with Laravel 5.
MIT License
146 stars 27 forks source link

\EchoIt\JsonApi\Handler::getNonBreakingErrors violates jsonapi spec #50

Closed mfn closed 5 years ago

mfn commented 8 years ago

The concept of getNonBreakingErrors() is a violation of the jsonapi spec which states:

The members data and errors MUST NOT coexist in the same document.

In the specific case, a request made with includes for a relation which is not allowed must return a complete error response, not one half of the requested data and the error.