Build advanced JSON API Servers with almost no code.
Full Changelog: https://github.com/FriendsOfCake/crud-json-api/compare/1.0.3...1.1.0
Full Changelog: https://github.com/FriendsOfCake/crud-json-api/compare/1.0.2...1.0.3
This release fixes two issues.
_
will now be ignored when generating the response (Previously only _joinData
and _matchingData
were ignored, this caused certain things like translations to break)Fixes a small issue that would cause related links to fail in cases where the associations are identical, but use different aliases in their conditions.
CakePHP 4 compatible release
Fixes issue with DELETE requests to non-relationship endpoints.
This release adds support for /relationships/
endpoints as defined by the JSON:API specification (fetching relationships and updating relationships). It also adds support for related
(i.e. /countries/1/currency
) endpoints. A helper JsonApiRoutes
class was also added to automatically create JSON:API compliant routes.
In order to make use of the new relationships
endpoints, you need to add the CrudJsonApi.Relationships
CRUD action. In order to get full support for related
endpoints, you need to make use of the CrudJsonApi.View
action, instead of the default Crud.View
one.
variable
(Generating camelBacked
attribute and relationship names)jsonApiBelongsToLinks
config option has been removed.self
link for relationships will always be a /relationships/
route (Where such a route exists)related
link for relationships will be in the form of /{model}/{id}/{relationshipName}
where such routes exist, otherwise it will be a direct link to the related entity view (if such a route exists)Make compatible with the latest beta of FriendsOfCake/crud