Skip to content

Commit 0b9fcc3

Browse files
committed
Update changelog
1 parent 5b30abe commit 0b9fcc3

File tree

2 files changed

+82
-39
lines changed

2 files changed

+82
-39
lines changed

.prettierrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"plugins": ["@prettier/plugin-php"],
77
"overrides": [
88
{
9-
"files": "docs/**/*",
9+
"files": ["docs/**/*", "*.md"],
1010
"options": {
1111
"printWidth": 80
1212
}

CHANGELOG.md

+81-38
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,32 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
6-
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to
7+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
78

89
## [Unreleased]
910

11+
### Added
12+
13+
- Add `Str::enum()` method
14+
([#75](https://github.com/tobyzerner/json-api-server/pull/75) by
15+
@bertramakers)
16+
- Allow literal values in `Field::default()` method
17+
([#80](https://github.com/tobyzerner/json-api-server/pull/80) by
18+
@bertramakers)
19+
20+
### Fixed
21+
22+
- Fix `Number` properties not being initialized
23+
- Fix validators not being run for null values
24+
- Fix `DateTime` values containing milliseconds not being accepted
25+
- Fix nested filters not receiving correct resource in context
26+
- Laravel: Fix `EloquentResource` sometimes using incorrect relation name when
27+
setting value
28+
- Laravel: Convert `DateTime` values to Laravel app's storage timezone
29+
- Laravel: Validate that `WhereBelongsTo` filter input is a list
30+
1031
## [1.0.0-alpha.2] - 2023-08-19
1132

1233
### Added
@@ -15,7 +36,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1536
- Add basic field schema configuration in preparation for OpenAPI generation
1637
- Add `Context::$query` to access the query used in the `Index` endpoint
1738
- Add `Context::fieldRequested()` and `Context::sortRequested()` methods
18-
- Add `BooleanDateTime` attribute for exposing internal date-time values as booleans
39+
- Add `BooleanDateTime` attribute for exposing internal date-time values as
40+
booleans
1941
- Improve error sources in Bad Request errors
2042
- Add a performance benchmark
2143

@@ -30,26 +52,30 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3052
- Fix `Integer` incorrectly not extending `Number`
3153
- Fix empty to-many relationships not being present in the response at all
3254
- Fix TypeError when removing non-nullable to-one relationship
33-
([#74](https://github.com/tobyzerner/json-api-server/issues/74))
55+
([#74](https://github.com/tobyzerner/json-api-server/issues/74) by
56+
@bertramakers)
3457

3558
## [1.0.0-alpha.1] - 2023-06-21
3659

37-
- **New class-based API.** More ergonomic for managing large resource definitions and
38-
inheriting/overriding behavior. Complex fields can be extracted into their own classes and
39-
reused across resources.
60+
- **New class-based API.** More ergonomic for managing large resource
61+
definitions and inheriting/overriding behavior. Complex fields can be
62+
extracted into their own classes and reused across resources.
4063

41-
- **Typed attributes.** Implementations of typed attributes are provided to match the data types
42-
in the OpenAPI specification. Attributes can be marked as required and nullable.
64+
- **Typed attributes.** Implementations of typed attributes are provided to
65+
match the data types in the OpenAPI specification. Attributes can be marked
66+
as required and nullable.
4367

44-
- **Customizable endpoints.** Each endpoint is now opt-in for each resource and can be configured
45-
and implemented separately. Also adds the ability for custom endpoints to be added.
68+
- **Customizable endpoints.** Each endpoint is now opt-in for each resource
69+
and can be configured and implemented separately. Also adds the ability for
70+
custom endpoints to be added.
4671

47-
- **Restructured internals.** The codebase is cleaner and easier to reason about, especially the
48-
serialization process.
72+
- **Restructured internals.** The codebase is cleaner and easier to reason
73+
about, especially the serialization process.
4974

5075
Still to come:
5176

52-
- Implementation of Laravel stuff (currently it is documented but not implemented)
77+
- Implementation of Laravel stuff (currently it is documented but not
78+
implemented)
5379
- Ability to generate OpenAPI definitions
5480
- Additional attribute types (array, object)
5581
- Benchmarks
@@ -58,7 +84,8 @@ Still to come:
5884

5985
### Fixed
6086

61-
- Fix `EloquentAdapter::filterByIds()` getting key name from query model instead of adapter model
87+
- Fix `EloquentAdapter::filterByIds()` getting key name from query model
88+
instead of adapter model
6289
- Fix deprecation notice on PHP 8.1
6390

6491
## [0.2.0-beta.6] - 2022-04-22
@@ -71,37 +98,41 @@ Still to come:
7198

7299
### Added
73100

74-
- `Context::getBody()` method to retrieve the parsed JSON:API payload from the request
75-
- `Context::sortRequested()` method to determine if a sort field has been requested
101+
- `Context::getBody()` method to retrieve the parsed JSON:API payload from the
102+
request
103+
- `Context::sortRequested()` method to determine if a sort field has been
104+
requested
76105

77106
### Fixed
78107

79-
- `Laravel\rules()`: Fix regression disallowing use of advanced validation rules like callbacks
80-
and `Rule` instances. (@SychO9)
108+
- `Laravel\rules()`: Fix regression disallowing use of advanced validation
109+
rules like callbacks and `Rule` instances. (@SychO9)
81110

82111
## [0.2.0-beta.4] - 2021-09-05
83112

84113
### Added
85114

86115
- `Laravel\rules()`: Replace `{id}` placeholder in rules with the model's key.
87-
- This is useful for the `unique` rule, for example: `unique:users,email,{id}`
116+
- This is useful for the `unique` rule, for example:
117+
`unique:users,email,{id}`
88118
- `Laravel\can()`: Pass through additional arguments to Gate check.
89119
- This is needed to use policy methods without models, for example:
90120
`can('create', Post::class)`
91121

92122
### Changed
93123

94-
- Get a fresh copy of the model to display after create/update to ensure consistency
95-
- Respond with `400 Bad Request` when attempting to filter on an attribute of a polymorphic
96-
relationship
124+
- Get a fresh copy of the model to display after create/update to ensure
125+
consistency
126+
- Respond with `400 Bad Request` when attempting to filter on an attribute of
127+
a polymorphic relationship
97128

98129
## [0.2.0-beta.3] - 2021-09-03
99130

100131
### Fixed
101132

102133
- Fix dependency on `http-accept` now that a version has been tagged
103-
- Change `EloquentAdapter` to load relationships using `load` instead of `loadMissing`, as they
104-
may need API-specific scopes applied
134+
- Change `EloquentAdapter` to load relationships using `load` instead of
135+
`loadMissing`, as they may need API-specific scopes applied
105136

106137
## [0.2.0-beta.2] - 2021-09-01
107138

@@ -115,7 +146,8 @@ Still to come:
115146
- `Context::filter()` method to get the value of a filter
116147
- `ResourceType::applyScope()`, `applyFilter()` and `applySort()` methods
117148
- `ResourceType::url()` method to get the URL for a model
118-
- `Forbidden` error details for CRUD actions, useful when running Atomic Operations
149+
- `Forbidden` error details for CRUD actions, useful when running Atomic
150+
Operations
119151
- `JsonApi::getExtensions()` method to get all registered extensions
120152
- `ConflictException` class
121153

@@ -135,16 +167,18 @@ Still to come:
135167
- Preliminary support for Extensions
136168
- Support filtering by nested relationships/attributes (eg.
137169
`filter[relationship.attribute]=value`)
138-
- Add new methods to Context object: `getApi`, `getPath`, `fieldRequested`, `meta`
170+
- Add new methods to Context object: `getApi`, `getPath`, `fieldRequested`,
171+
`meta`
139172
- Eloquent adapter: apply scopes when including polymorphic relationships
140173
- Laravel validation helper: support nested validation messages
141174
- Allow configuration of sort and filter visibility
142175
- Add new `setId` method to `AdapterInterface`
143176

144177
### Changed
145178

146-
- Change paradigm for eager loading relationships; allow fields to return `Deferred` values to be
147-
evaluated after all other fields, so that resource loading can be buffered.
179+
- Change paradigm for eager loading relationships; allow fields to return
180+
`Deferred` values to be evaluated after all other fields, so that resource
181+
loading can be buffered.
148182
- Remove `on` prefix from field event methods
149183

150184
### Removed
@@ -157,12 +191,21 @@ Still to come:
157191

158192
[1.0.0-alpha.2]:
159193
https://github.com/tobyzerner/json-api-server/compare/v1.0.0-alpha.1...v1.0.0-alpha.2
160-
[1.0.0-alpha.1]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0...v1.0.0-alpha.1
161-
[0.2.0]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0...v0.2.0-beta.6
162-
[0.2.0-beta.6]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.6...v0.2.0-beta.5
163-
[0.2.0-beta.5]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.5...v0.2.0-beta.4
164-
[0.2.0-beta.4]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.4...v0.2.0-beta.3
165-
[0.2.0-beta.3]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.3...v0.2.0-beta.2
166-
[0.2.0-beta.2]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.2...v0.2.0-beta.1
167-
[0.2.0-beta.1]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.1...v0.1.0-beta.1
168-
[unreleased]: https://github.com/tobyzerner/json-api-server/compare/v1.0.0-alpha.2...HEAD
194+
[1.0.0-alpha.1]:
195+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0...v1.0.0-alpha.1
196+
[0.2.0]:
197+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0...v0.2.0-beta.6
198+
[0.2.0-beta.6]:
199+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.6...v0.2.0-beta.5
200+
[0.2.0-beta.5]:
201+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.5...v0.2.0-beta.4
202+
[0.2.0-beta.4]:
203+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.4...v0.2.0-beta.3
204+
[0.2.0-beta.3]:
205+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.3...v0.2.0-beta.2
206+
[0.2.0-beta.2]:
207+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.2...v0.2.0-beta.1
208+
[0.2.0-beta.1]:
209+
https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.1...v0.1.0-beta.1
210+
[unreleased]:
211+
https://github.com/tobyzerner/json-api-server/compare/v1.0.0-alpha.2...HEAD

0 commit comments

Comments
 (0)