Closed
Description
Now that neomerx/json-api
is at 1.0
we want to get this library to 1.0
as soon as possible - to give people confidence that the API is stable.
The recent routing refactor and reducing the number of units per resource type (currently on develop
- will be released as 0.8
) puts in a lot of pre-1.0 changes that we wanted to do to simplify the package.
Required 1.0 Features
- Full support for filtering, paging etc for relationship endpoints - including test helpers. See Pagination in readRelatedResource #22, Include related resources #23, Test helper for relationships #27, Adding include, filter, sort... on Related Resource #77
- Support
with
when retrieving single records. See with not being called in single record request #62 - Hydrator simplification. See Hydrator Simplification #69
- Hydrate Eloquent polymorphic relationships. See Hydrate polymorphic relationships #35
- Generic authorizer that hands off to Laravel policies. See Method for using Laravel native Policies for API authorization? #45
- Refactor
JsonApiController
so that it has the majority of the workflow that currently exists withinEloquentController
. Extend the Eloquent controller from this new controller. - Add a broadcast helper trait. See Convert Model to JsonApi object in a custom Controller. #36
- Add a blade template helper to encode JSON API data into a HTML page. See Convert Model to JsonApi object in a custom Controller. #36
- Convert tests to Laravel 5.4 style - i.e. remove dependency on
laravel/browser-kit-testing
. - Drop support for Laravel 5.3 and ensure support for 5.4 and 5.5 at 1.0.
- Unit tests in this package rather than relying on the demo app to test package is working.
Addjson-api:cache
andjson-api:clear
commands to cache theApiInterface
object. This will give a performance benefit to HTTP requests along the lines ofroute:cache
.
Required Internal Changes
- Rename the
Resource
class as it is a reserved word in PHP 7.0 - Extract
StandardObjectInterface
and related generic classes to a separate utility library. - Single
ValidatorErrorFactoryInterface
in thecloudcreativity/json-api
package rather than extending that interface inlaravel-json-api
. - Ideally stop injecting
HttpServiceInterface
and instead inject theApiInterface
andRequestInterface
directly. This is possible as long as no services are created post the JSON-API middleware running.
Opening this issue so that people can comment on any features that they think are needed for 1.0.
Metadata
Metadata
Assignees
Labels
No labels