2
2
3
3
All notable changes to this project will be documented in this file.
4
4
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 ) .
7
8
8
9
## [ Unreleased]
9
10
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
+
10
31
## [ 1.0.0-alpha.2] - 2023-08-19
11
32
12
33
### Added
@@ -15,7 +36,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
15
36
- Add basic field schema configuration in preparation for OpenAPI generation
16
37
- Add ` Context::$query ` to access the query used in the ` Index ` endpoint
17
38
- 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
19
41
- Improve error sources in Bad Request errors
20
42
- Add a performance benchmark
21
43
@@ -30,26 +52,30 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
30
52
- Fix ` Integer ` incorrectly not extending ` Number `
31
53
- Fix empty to-many relationships not being present in the response at all
32
54
- 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 )
34
57
35
58
## [ 1.0.0-alpha.1] - 2023-06-21
36
59
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.
40
63
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.
43
67
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.
46
71
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.
49
74
50
75
Still to come:
51
76
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)
53
79
- Ability to generate OpenAPI definitions
54
80
- Additional attribute types (array, object)
55
81
- Benchmarks
@@ -58,7 +84,8 @@ Still to come:
58
84
59
85
### Fixed
60
86
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
62
89
- Fix deprecation notice on PHP 8.1
63
90
64
91
## [ 0.2.0-beta.6] - 2022-04-22
@@ -71,37 +98,41 @@ Still to come:
71
98
72
99
### Added
73
100
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
76
105
77
106
### Fixed
78
107
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 )
81
110
82
111
## [ 0.2.0-beta.4] - 2021-09-05
83
112
84
113
### Added
85
114
86
115
- ` 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} `
88
118
- ` Laravel\can() ` : Pass through additional arguments to Gate check.
89
119
- This is needed to use policy methods without models, for example:
90
120
` can('create', Post::class) `
91
121
92
122
### Changed
93
123
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
97
128
98
129
## [ 0.2.0-beta.3] - 2021-09-03
99
130
100
131
### Fixed
101
132
102
133
- 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
105
136
106
137
## [ 0.2.0-beta.2] - 2021-09-01
107
138
@@ -115,7 +146,8 @@ Still to come:
115
146
- ` Context::filter() ` method to get the value of a filter
116
147
- ` ResourceType::applyScope() ` , ` applyFilter() ` and ` applySort() ` methods
117
148
- ` 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
119
151
- ` JsonApi::getExtensions() ` method to get all registered extensions
120
152
- ` ConflictException ` class
121
153
@@ -135,16 +167,18 @@ Still to come:
135
167
- Preliminary support for Extensions
136
168
- Support filtering by nested relationships/attributes (eg.
137
169
` 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 `
139
172
- Eloquent adapter: apply scopes when including polymorphic relationships
140
173
- Laravel validation helper: support nested validation messages
141
174
- Allow configuration of sort and filter visibility
142
175
- Add new ` setId ` method to ` AdapterInterface `
143
176
144
177
### Changed
145
178
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.
148
182
- Remove ` on ` prefix from field event methods
149
183
150
184
### Removed
@@ -157,12 +191,21 @@ Still to come:
157
191
158
192
[ 1.0.0-alpha.2] :
159
193
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