File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
tests/dummy/tests/Api/V1/Posts Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,18 @@ All notable changes to this project will be documented in this file. This projec
13
13
- [ #127 ] ( https://github.com/laravel-json-api/laravel/issues/127 ) The ` JsonApiResource ` class now has a
14
14
protected ` serializeRelation ` method that can be used to override the default serialization of relationships if
15
15
needed.
16
+ - [ #111 ] ( https://github.com/laravel-json-api/laravel/issues/111 ) Relationship documents returned by relationship ` self `
17
+ routes will now include any non-standard links set on the resource relationship in the top-level ` links ` member.
16
18
17
19
### Fixed
18
20
19
21
- [ #130 ] ( https://github.com/laravel-json-api/laravel/issues/130 ) The ` JsonApiResource ` now correctly handles conditional
20
22
fields when iterating over relationships to find a specific relation.
23
+ - [ #105 ] ( https://github.com/laravel-json-api/laravel/issues/105 ) The JSON: API document returned by a relationship ` self `
24
+ route now handles a relationship not existing if it is hidden. Previously an exception was thrown when attempting to
25
+ merge relationship links into the document.
26
+ - [ #111 ] ( https://github.com/laravel-json-api/laravel/issues/111 ) Relationship documents now handle a relationship that
27
+ does not have one or both of the ` self ` and ` related ` relationship links.
21
28
22
29
## [ 1.0.1] - 2021-12-08
23
30
Original file line number Diff line number Diff line change 27
27
"ext-json" : " *" ,
28
28
"laravel-json-api/core" : " ^1.1" ,
29
29
"laravel-json-api/eloquent" : " ^1.0.1" ,
30
- "laravel-json-api/encoder-neomerx" : " ^1.0.0 " ,
30
+ "laravel-json-api/encoder-neomerx" : " ^1.1 " ,
31
31
"laravel-json-api/exceptions" : " ^1.0.0" ,
32
32
"laravel-json-api/spec" : " ^1.0.0" ,
33
33
"laravel-json-api/validation" : " ^1.0.0" ,
Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ public function test(): void
37
37
->withoutExceptionHandling ()
38
38
->jsonApi ()
39
39
->expects ('posts ' )
40
- ->get (url ('/api/v1/posts ' , $ expected ['id ' ]));
40
+ ->get ($ self = url ('/api/v1/posts ' , $ expected ['id ' ]));
41
41
42
- $ response ->assertFetchedOneExact ($ expected );
42
+ $ response ->assertFetchedOneExact ($ expected )-> assertLinks ( compact ( ' self ' )) ;
43
43
}
44
44
45
45
public function testIncludeAuthorAndTags (): void
You can’t perform that action at this time.
0 commit comments