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
27
27
- Remove ` Pagination\Concerns\BuildsUrls ` trait (replaced by
28
28
` Context::currentUrl() ` )
29
29
- Move ` Extension\Atomic ` to ` Extension\Atomic\Atomic `
30
+ - Remove ` json_api_response() ` helper (use ` Context::createResponse() ` instead)
30
31
31
32
### Added
32
33
33
34
- Add ` Context::createResponse() ` method for building JSON: API responses with
34
35
automatic ` jsonapi ` object inclusion
35
36
- Add ` JsonApi::meta() ` method for including meta information in the ` jsonapi `
36
37
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
41
41
- Add ` Page::$rangeTruncated ` parameter for cursor pagination range truncation
42
42
support
43
43
- Add full support for JSON: API profiles:
Original file line number Diff line number Diff line change @@ -96,6 +96,6 @@ class Context
96
96
public function activateProfile(string $uri): static;
97
97
98
98
// Create a JSON:API response with document data
99
- public function createResponse(array $document): Response;
99
+ public function createResponse(array $document = [] ): Response;
100
100
}
101
101
```
Original file line number Diff line number Diff line change 7
7
use Nyholm \Psr7 \ServerRequest ;
8
8
use Psr \Http \Message \ResponseInterface ;
9
9
use Psr \Http \Message \ServerRequestInterface ;
10
- use Psr \Http \Message \ServerServerRequestInterface ;
11
10
use Psr \Http \Server \RequestHandlerInterface ;
12
11
use Tobyz \JsonApiServer \Exception \ErrorProvider ;
13
12
use Tobyz \JsonApiServer \Exception \InternalServerErrorException ;
You can’t perform that action at this time.
0 commit comments