Releases: FriendsOfCake/crud-json-api
Releases · FriendsOfCake/crud-json-api
1.0.0-beta4
- Fixes potential issue with routes introduced in 1.0.0-beta3
1.0.0-beta3
- Fixes an issue with single entities
- Fixes issue with certain routes
- Ensures that PHPUnit tests pass
1.0.0-beta2
Small fixes around type hinting and related routes
1.0.0-beta
CakePHP 4 compatible release.
An important change in this release is that the BodyParserMiddleware must be added to your application middleware queue and the following parser code must be added
$bodies = new BodyParserMiddleware();
$bodies->addParser(['application/vnd.api+json'], function ($body) {
return json_decode($body, true);
});
$middlewareQueue->add($bodies); 0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
This release upgrades Crud JsonApi to use neomerx/jsonapi version 3.x, and JSON API 1.1. A number of backwards incompatible changes where made.
Backwards incompatible changes
- Minimum PHP version bumped to PHP 7.1
- Minimum cakePHP version bumped to CakePHP 3.7
- If you use custom schema objects please see the neomerx/jsonapi upgrade notes for a list of changes in neomerx/jsonapi.
- The
DynamicEntitySchemaobject now only works withCake\ORM\Tableobjects instead ofRepositoryInterfaceobjects. In the past, it would accept non-table objects, but things would break as it makes use of methods that are part of the concreteTableclass, and not specified in the interface. - Entity types are now inferred from the class name instead of the registry alias. This makes responses more predictable for cases where an association is aliased (example
CreatedBy->UsersTable) - Entity attributes are now shallowly created. This means that associated entities aren't converted into an array until the include object is built (Instead of deeply into each object). It also helps prevent circular associations from breaking everything.
New features and fixes
- Supports PHP 7.3
- BelongsTo relations will always be included in the
relationshipsobject, even if their data isn't included. - Schema objects for associations that are loaded/included in an entity (via lazy loading for example) will be loaded
- Ability to add a top-level
linksobject by setting thelinksconfig on the listener - Fixed an issue with queries that use
formatResultsand other result decorators (#87). - Pagination links will include the
sortquery param if set. - Added a custom
SearchListenerto make it easier to share search configuration between Json Api and conventional endpoints - Better support for compound keys
0.4.0
- now supports setting hasMany relationships with PATCH request
- improves performance of GET requests for resources with belongsTo relationships
💡 Did you know crud-json-api allows you to build complex JSON API Servers with almost no code? 💡
- deeply nested compound documents
- multi-field filtering
- multi-field sorting
- sparse fieldsets