Upgrading
composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"
Changelog
Added
- The
JsonApiException
class now has a context()
method. Laravel's exception handler uses this to add log context when the exception is logged. This means logging of JSON:API exceptions will now include the HTTP status code and the JSON:API errors.
- Moved the default
406 Not Acceptable
and 415 Unsupported Media Type
messages to the following two new exception classes:
Exceptions\HttpNotAcceptableException
Exceptions\HttpUnsupportedMediaTypeException
Fixed
- #184 Ensure that an
Accept
header with the media type application/json
is rejected with a 406 Not Acceptable
response. Previously this media type worked, which is incorrect as the JSON:API specification requires the media type application/vnd.api+json
.
- #197 Fix sending
null
for a to-one relationship update.