Skip to content

Commit ec12976

Browse files
committed
0.2.0-beta.5
1 parent 4a22088 commit ec12976

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.0-beta.5]
9+
### Added
10+
- `Context::getBody()` method to retrieve the parsed JSON:API payload from the request
11+
- `Context::sortRequested()` method to determine if a sort field has been requested
12+
13+
### Fixed
14+
- `Laravel\rules()`: Fix regression disallowing use of advanced validation rules like callbacks and `Rule` instances. (@SychO9)
15+
816
## [0.2.0-beta.4]
917
### Added
1018
- `Laravel\rules()`: Replace `{id}` placeholder in rules with the model's key.
@@ -62,7 +70,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6270
### Fixed
6371
- Fix pagination next link appearing when it shouldn't
6472

65-
[0.2.0-beta.4]: https://github.com/tobyzerner/json-api-models/compare/v0.2.0-beta.4...v0.2.0-beta.3
66-
[0.2.0-beta.3]: https://github.com/tobyzerner/json-api-models/compare/v0.2.0-beta.3...v0.2.0-beta.2
67-
[0.2.0-beta.2]: https://github.com/tobyzerner/json-api-models/compare/v0.2.0-beta.2...v0.2.0-beta.1
68-
[0.2.0-beta.1]: https://github.com/tobyzerner/json-api-models/compare/v0.2.0-beta.1...v0.1.0-beta.1
73+
[0.2.0-beta.5]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.5...v0.2.0-beta.4
74+
[0.2.0-beta.4]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.4...v0.2.0-beta.3
75+
[0.2.0-beta.3]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.3...v0.2.0-beta.2
76+
[0.2.0-beta.2]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.2...v0.2.0-beta.1
77+
[0.2.0-beta.1]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.1...v0.1.0-beta.1

docs/requests.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@ This object contains a number of useful methods:
5757
* `getPath(): string`
5858
Get the request path relative to the API's base path.
5959

60+
* `getBody(): ?array`
61+
Get the parsed JSON:API payload.
62+
6063
* `fieldRequested(string $type, string $field, bool $default = true): bool`
6164
Determine whether a field has been requested in a [sparse fieldset](https://jsonapi.org/format/1.1/#fetching-sparse-fieldsets).
6265

66+
* `sortRequested(string $field): bool`
67+
Determine whether a sort field has been requested.
68+
6369
* `filter(string $name): ?string`
6470
Get the value of a filter.
6571

0 commit comments

Comments
 (0)