Commit Graph

854 Commits

Author SHA1 Message Date
Mark Paluch
be176936b7 Prepare next development iteration.
See #2320
2023-11-17 13:40:59 +01:00
Mark Paluch
ce1d04581b Release version 4.1.6 (2023.0.6).
See #2320
2023-11-17 13:38:04 +01:00
Oliver Drotbohm
cc259f9927 Runtime hints to include rest-messages files.
Fixes GH-2330.
2023-11-16 15:12:10 +01:00
Oliver Drotbohm
d34d6a979e Properly merge non-entity arrays.
Fixes #2325.
2023-11-16 15:02:21 +01:00
John Blum
8ef6d1ea32 Prepare next development iteration.
See #2309
2023-10-13 08:09:32 -07:00
John Blum
767c548170 Release version 4.1.5 (2023.0.5).
See #2309
2023-10-13 08:01:14 -07:00
Mark Paluch
eb54207c1f Prepare next development iteration.
See #2302
2023-09-15 10:55:34 +02:00
Mark Paluch
c0441c349a Release version 4.1.4 (2023.0.4).
See #2302
2023-09-15 10:52:26 +02:00
Oliver Drotbohm
a567a893cb Reinstate new object addition for collections in patch operations.
The removal of manual collection value appendance for primitives in the context of GH-2261 lead to complex object to be appended onto a collection not being deserialized at all. This deserialization is now reinstantiated with the value to be added looked up by reading the parent node into the collections element type using a JSON Pointer expression of /$propertyName/$index. This is done to make sure that @JsonDeserialize annotations on the property kick in for the deserialization of the individual elements.

We now also shortcut the entire merge algorithm for collections that are empty, contain primitives or enums.

Fixes GH-2287.
2023-08-30 21:34:37 +02:00
Mark Paluch
ebaac9960c Prepare next development iteration.
See #2291
2023-08-18 14:07:34 +02:00
Mark Paluch
9e57d8e2de Release version 4.1.3 (2023.0.3).
See #2291
2023-08-18 14:04:04 +02:00
Mark Paluch
75cc52dbc3 Prepare next development iteration.
See #2274
2023-07-14 13:57:57 +02:00
Mark Paluch
98cd673317 Release version 4.1.2 (2023.0.2).
See #2274
2023-07-14 13:54:07 +02:00
John Blum
d30e1f4aca Prepare next development iteration.
See #2259
2023-06-16 08:13:28 -07:00
John Blum
91a38726f5 Release version 4.1.1 (2023.0.1).
See #2259
2023-06-16 08:05:36 -07:00
Oliver Drotbohm
ecba61662c Fix regression in PUT handling for empty nested documents.
The fix for #2174 introduced a bug for our PUT handling of nested documents in case the target object's field value is null as it would only apply the nested value if all Optionals were present. This is, of course not the case.

Fixes #2264.
2023-06-12 11:40:28 +02:00
Oliver Drotbohm
2fb1fa9289 Avoid manually handling additional primitive elements in collection merging for PATCHes.
Fixes #2261.
2023-06-12 11:40:08 +02:00
Christoph Strobl
bfca1dfa0b Prepare next development iteration.
See #2255
2023-05-12 14:19:10 +02:00
Christoph Strobl
e1877c3f9f Release version 4.1 GA (2023.0.0).
See #2255
2023-05-12 14:14:39 +02:00
Oliver Drotbohm
9020e1d10d Upgrade optional Jackson/JPA integration to Hibernate 6.
Fixes #2234.
2023-05-03 23:01:57 +02:00
Will Fleury
816ca84e70 Populate custom ExceptionHandlerExceptionResolver with ApplicationContext.
Fixes #2245.
Original pull request #2246.
2023-05-03 17:05:52 +02:00
Greg L. Turnquist
3a7c81df17 Prepare next development iteration.
See #2243
2023-04-14 11:59:58 -05:00
Greg L. Turnquist
2039a15e59 Release version 4.1 RC1 (2023.0.0).
See #2243
2023-04-14 11:54:00 -05:00
Christoph Strobl
e5bc3be69a Prepare next development iteration.
See #2229
2023-03-20 15:05:34 +01:00
Christoph Strobl
00884c09c7 Release version 4.1 M3 (2023.0.0).
See #2229
2023-03-20 15:01:48 +01:00
Oliver Drotbohm
e4bca534bf Support to receive aggregate references as request parameters.
We now support using AggregateReference as type to bind request parameters taking URIs pointing to related aggregates. The default resolution will try to resolve the entire URI via UriToEntityConverter but one can also provide a function that can extract any part of the URI to be then resolved into either an identifier, aggregate instance or jMolecules Association against the ConversionService.

Fixes #2239.
2023-03-19 23:56:39 +01:00
Oliver Drotbohm
6d0034f15f Support for query methods returning a Slice.
Built on the the just introduced RepresentationModelAssembler implementations based on Slice in Spring HATEOAS and Spring Data Commons we now support returning a SlicedModel from the controller backing search resources ultimately triggering repository query methods.

The introduction triggered the refactoring to introduce RepresentationModelAssemblers (RMA) to remove the need for controllers inheriting from AbstractRepositoryController to access RepresentationModel assembly functionality. RMA acts as a facade for both Paged-/SlicedResourceAssembler as well as PersistentEntityResourceAssembler.

Fixes #2235.
2023-03-02 17:20:09 +01:00
Oliver Drotbohm
fb1924286a Use FormattingConversionService in JSON Patch binding.
We no pipe the Spring MVC ConversionService into the JSON Patch path binding. That usually is a FormattingConversionService at runtime and also supports the conversion of dates.

The ConversionServices is configured into the BindContext(Factory) we use for binding. The context then exposes the EvaluationContext set up with it.

Fixes #2233.
2023-02-21 18:43:19 +01:00
Oliver Drotbohm
d02d1bb0c1 Support for returning response bodies on deletion of item resources.
RepositoryRestConfiguration now allows to configure to return a response body for the deletion of item resources. The controller implementation follows the same patter we have already established for creation and updates: unless explicitly enabled or disabled we now consider the presence of an accept header as indicator of whether a response body should be rendered.

This could be a "breaking" change for clients having explicitly expected 204 until now even for requests with an Accept header. If that's an issue, those should either explicitly disable the setting, do not submit an Accept header or loosen their expectations to expect either 200 or 2xx as indicator of success in general.

Fixes #2225.
2023-02-21 17:25:28 +01:00
Oliver Drotbohm
7c0fc837a3 Register MVC validator with Spring Data REST HandlerAdapter.
Fixes: #967.
Original pull request: 2108.
2023-02-21 15:46:08 +01:00
zhengchalei
890111f06f Fix doc link end label in ResourceStatus.
Fixes #2139
2023-02-21 14:19:46 +01:00
Oliver Drotbohm
6c4f57f31a Avoid obsolete inspection of DefaultedPageable.
The instance can never be null and thus we don't actually have to check for that.

Fixes #2222
2023-02-21 14:14:38 +01:00
Oliver Drotbohm
b65e0c9118 Adapt to renamed properties by using MappedProperties in association deserialization.
Revert the changes that employed manual annotation lookup as that would cause invalid associations of fields and accessor methods for properties shadow renamed. Instead, we now use MappedProperties that already contains a mapping between the Jackson field names and Sprign Data property names.

Fixes: #2165
2023-02-21 13:26:14 +01:00
Lars Vierbergen
5335fe61e9 Fix mapping URIs to @JsonProperty annotated associations
Normally, when creating and updating (POST/PUT) an entity via the REST endpoints, you can use the URL of the relation target. (e.g.: send `{"package": "/packages/1"}` when `package` is a JPA `@OneToOne` relation).

Now this also takes into account when the JPA relation is annotated with `@JsonProperty` to change the serialized name.

Add unit tests for linkable associations.

Issue: #2165
2023-02-21 13:26:08 +01:00
Oliver Drotbohm
f18491f722 Properly deep-merge nested documents on PUT.
This is needed to consider read-only properties within those objects as those would otherwise get overridden.

Fixes: #2174
2023-02-21 10:36:38 +01:00
Christoph Strobl
8443df3e7d Prepare next development iteration.
See #2228
2023-02-17 14:25:46 +01:00
Christoph Strobl
45d57fe97d Release version 4.1 M2 (2023.0.0).
See #2228
2023-02-17 14:22:31 +01:00
Christoph Strobl
61f9db5935 Prepare next development iteration.
See #2204
2023-02-17 13:31:53 +01:00
Christoph Strobl
3c32219d6b Release version 4.1 M1 (2023.0.0).
See #2204
2023-02-17 13:27:50 +01:00
Oliver Drotbohm
0db1adadd0 Register StdValueInstantiator._constructorArguments for reflection.
The field is looked up by reflection in ValueInstantiatorCustomizer.

Fixes #2213.
2023-01-20 16:35:30 +01:00
Oliver Drotbohm
1bfa83cb73 Register per-repository pattern for observability purposes.
The standard Spring MVC observability integration registers the plain request pattern for observations. For our repository controllers that would result in one pattern registered for all individual repository resources (e.g. /{repository}/{id} etc.). However, the insights users would like to gain rather follows the individual repositories exposed. That's why we have so far exposed repository specific path pattern (/myrepo/{id}) via a custom request attribute. To adhere to the new observability integration of Spring Framework 6, we need to expose that particular pattern on the ServerRequestObservationContext, too.

Fixes #2212.
2023-01-09 15:31:57 +01:00
Mark Paluch
f0e86b9a17 Extend license header copyright years to 2023.
See #2211
2023-01-02 09:53:37 +01:00
Christoph Strobl
6f68fe814f Add Nullable annotation to parameter of overridden equals method.
Closes: #2196
Original pull request: #2197
2022-12-02 11:16:15 +01:00
Mark Paluch
98aefe0c85 Prepare next development iteration.
See #2190
2022-11-18 14:30:19 +01:00
Mark Paluch
eb10fb1e41 Release version 4.0 GA (2022.0.0).
See #2190
2022-11-18 14:26:23 +01:00
Mark Paluch
c3c9da67f2 Upgrade to JPA API 3.1 and Servlet API 6.1.
Closes #2195
2022-11-07 15:54:22 +01:00
Mark Paluch
da86021c12 Prepare next development iteration.
See #2192
2022-11-04 15:26:38 +01:00
Mark Paluch
fd5715c829 Release version 4.0 RC2 (2022.0.0).
See #2192
2022-11-04 15:23:17 +01:00
Christoph Strobl
b3e8489085 Added AOT metadata.
We now register @BasePathAwareController instances for class proxy generation. Also, we scan the packages of repository definitions for projection interfaces to register reflective access for them.

Fixes #2183.
2022-10-27 11:50:57 +02:00
Mark Paluch
9c05312d36 Prepare next development iteration.
See #2180
2022-10-13 17:31:15 +02:00