File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,17 @@ and this project adheres to
2727- Remove ` Pagination\Concerns\BuildsUrls ` trait (replaced by
2828 ` Context::currentUrl() ` )
2929- Move ` Extension\Atomic ` to ` Extension\Atomic\Atomic `
30+ - Remove ` json_api_response() ` helper (use ` Context::createResponse() ` instead)
3031
3132### Added
3233
3334- Add ` Context::createResponse() ` method for building JSON: API responses with
3435 automatic ` jsonapi ` object inclusion
3536- Add ` JsonApi::meta() ` method for including meta information in the ` jsonapi `
3637 object
37- - Add ` Resource::links() ` method for defining custom resource-level links
38- (including ` describedby ` )
39- - Add ` Schema\Link ` class for defining rich link objects with metadata
40- - Add ` JsonApiError::id(string $id) ` method for setting error IDs
38+ - Add support for resource links:
39+ - Add ` Resource::links() ` method for defining custom resource-level links
40+ - Add ` Schema\Link ` class for defining rich link objects with metadata
4141- Add ` Page::$rangeTruncated ` parameter for cursor pagination range truncation
4242 support
4343- Add full support for JSON: API profiles:
Original file line number Diff line number Diff line change @@ -96,6 +96,6 @@ class Context
9696 public function activateProfile(string $uri): static;
9797
9898 // Create a JSON:API response with document data
99- public function createResponse(array $document): Response;
99+ public function createResponse(array $document = [] ): Response;
100100}
101101```
Original file line number Diff line number Diff line change 77use Nyholm \Psr7 \ServerRequest ;
88use Psr \Http \Message \ResponseInterface ;
99use Psr \Http \Message \ServerRequestInterface ;
10- use Psr \Http \Message \ServerServerRequestInterface ;
1110use Psr \Http \Server \RequestHandlerInterface ;
1211use Tobyz \JsonApiServer \Exception \ErrorProvider ;
1312use Tobyz \JsonApiServer \Exception \InternalServerErrorException ;
You can’t perform that action at this time.
0 commit comments