Commit Graph

510 Commits

Author SHA1 Message Date
Oliver Drotbohm
3e9c90d0df #1985 - Avoid compiling agains JSONArray in JsonPathLinkDiscoverer.
So far, the handling of links detected via a JSON Path expression has assumed that the JsonProvider would always return JSONArray objects for collections. However, the JacksonJsonProvider for example, returns plain List instances. As JSONArray implements List, we now only refer to the latter for maximum compatibility with different JsonProvider implementations.

Original ticket: #1980
2023-06-29 18:58:32 +02:00
Oliver Drotbohm
9157958122 #1983 - Rearrangement of AOT reflection configuration creation.
The reflection configuration of core Spring HATEOAS types is now done via HateoasRuntimeHints (previously RepresentationModelRuntimeHints). This allows the configuration to be contributed, even without @EnableHypermediaSupport in play, especially helpful in Web.fn scenarios.
2023-06-26 15:44:45 +02:00
Oliver Drotbohm
a88c0cf54c #1983 - Additional reflection hints for custom Jackson serializer in EntityModel.
We now register reflection hints for all types contained in EntityModel, so that MapSuppressingUnwrappingSerializer's default constructor can be called from Jackson.

Original ticket: #1981
Related ticket: spring-projects/spring-boot#36057
2023-06-25 16:48:46 +02:00
Oliver Drotbohm
ab4b2bfb98 #1977 - Update changelog. 2023-05-11 22:07:43 +02:00
Oliver Drotbohm
69e7af0b94 #1966 - Upgrade optional Validation API support to 3.0. 2023-05-03 18:03:43 +02:00
Oliver Drotbohm
3efd2e928d #1951 - Prepare changelog. 2023-03-20 11:57:48 +01:00
Oliver Drotbohm
768814527d #1917 - Update changelog. 2023-02-16 23:55:47 +01:00
Oliver Drotbohm
efde43a511 #1902 - Fix link header parsing for multiple links and unquoted attribute values.
Fixed the regular expression to parse link header values to properly consider the comma to end an unquoted attribute value, too. Couple of additional unit tests, too.
2023-02-15 10:34:49 +01:00
Kevin Defives
837608fe44 #1902 - Test case to reproduce unquoted link attribute parsing bug. 2023-02-15 10:34:36 +01:00
Oliver Drotbohm
66d34c1435 #1897 - Update changelog. 2023-01-12 12:48:48 +01:00
Oliver Drotbohm
fa831ab945 #1887 - Avoid trailing slash for links pointing to empty mapping path. 2023-01-12 09:05:10 +01:00
Oliver Drotbohm
856b6b9cbe #1881 - Fix flaky test. 2022-11-16 18:52:51 +01:00
Oliver Drotbohm
03aa0a6df7 #1881 - Update changelog. 2022-11-16 12:46:16 +01:00
Oliver Drotbohm
c425f3f355 #1868 - Update changelog. 2022-11-03 23:21:12 +01:00
Oliver Drotbohm
26c1e10f68 #1862 - Update changelog. 2022-10-12 12:58:58 +02:00
Oliver Drotbohm
265f0a1dcc #1857 - Upgrade to Spring Framework 6.0 RC1.
Temporarily disable HypermediaWebClientConfigurerTest due to https://github.com/spring-projects/spring-framework/issues/29307.
2022-10-12 12:20:28 +02:00
Oliver Drotbohm
aecea4fd78 #1845 - Update changelog. 2022-09-15 16:26:51 +02:00
Oliver Drotbohm
95ff31d2b5 #1830 - Reset dummy invocation cache on request completion. 2022-09-14 16:54:24 +02:00
Oliver Drotbohm
9448e7d276 #1818 - Update changelog. 2022-07-15 14:52:50 +02:00
Oliver Drotbohm
c11d21d123 #1814 - Update changelog. 2022-07-14 11:56:14 +02:00
Oliver Drotbohm
0098f2931a #1813 - Tweak integration tests to adapt to changed trailing slash handling in Spring 6.
See [0] for details.

[0] https://github.com/spring-projects/spring-framework/issues/28552
2022-07-14 10:51:38 +02:00
Oliver Drotbohm
42ae74b90d #1800 - Allow dots in template variable names. 2022-06-18 19:15:10 +02:00
Oliver Drotbohm
2de450531b #1796 - Relax generics bound in ReactiveRepresentationModelAssembler.
We now relax the generic bound of D to … extends RepresentationModel<?> as otherwise implementation code of, for example, toModel(…) has to produce a concrete representation model and cannot be typed to return RepresentationModel<?>.
2022-05-31 12:26:19 +02:00
Oliver Drotbohm
3730a6f270 #1793 - Revamped mapping handling.
Introduced UriMapping to contain the original request mapping used on a controller method as well as a MappingVariables instance that captures all used variables of those mappings. These mappings and variables are not following URI template semantics but rather PathPattern. One example of this playing into the processing is the path segment capture syntax {*…}. This is roughly equivalent to URI template's composite path syntax {/…*}, which however looks different (as the leading slash is contained in the variable expression).

While the handling of those has been added in the commit before, we now introduce the proper abstractions that cause a couple of internal deprecations and binary-incompatible changes and we only want to impose them on implementors upgrading to 2.0. Also, this allows simplifying WebHandler which has accumulated quite a bit of logic already.
2022-05-30 20:21:38 +02:00
Oliver Drotbohm
e29d83d5ea #1793 - Fix handling of {*…} pattern variables in URI mappings.
We now properly handle path segment capture variables in URI mappings. Values handed into the dummy method invocations are expanded properly and a given null results in the composite segment template variable {/…*} being rendered to advertise the ability to add further segments.
2022-05-30 20:21:37 +02:00
Oliver Drotbohm
57317d0db8 #1722 - Original test case. 2022-05-16 09:42:10 +02:00
Oliver Drotbohm
f4f7f69e1f #1790 - Upgrade to Reactor 2022.0.0 M2. 2022-05-12 20:54:00 +02:00
Oliver Drotbohm
872e514654 #1789 - Update changelog. 2022-05-12 18:01:35 +02:00
Réda Housni Alaoui
4be0e28f30 #1776 - Do not expose URL template variable for MultipartFile parameter. 2022-05-10 15:02:00 +02:00
Oliver Drotbohm
ab45ba3f11 #1760 - Prepare changelog for 2.0 M2. 2022-02-17 12:48:14 +01:00
Oliver Drotbohm
a7099a8394 #1750 - Update copyright years to 2022. 2022-02-07 10:35:09 +01:00
Oliver Drotbohm
80c28defba #1757 - Polishing.
Slightly more compact default regex pattern. Untangle defaulting condition in PropertyMetdata.getPattern(). Extract test cases into dedicated methods. Couple of Javadoc fixes. Java-9-based polishing by using Optional.or(…) in JSR 303 PropertyMetadata implementation.
2022-01-28 09:28:40 +01:00
Faron Dutton
1f6f1e24d4 #1757 - Add support for javax.validation.constraints.NotBlank.
The presence of @NonBlank on a representation model's property now causes it to be considered required. It will also cause a default pattern exposed that allows clients to validate input values.

Fixes #1757.
2022-01-28 09:28:40 +01:00
Oliver Drotbohm
c501fa20f7 #1750 - Continue development on 2.0.0-SNAPSHOT. 2022-01-17 08:39:05 +01:00
Oliver Drotbohm
9352e56358 #1639 - Prepare 2.0 development.
Upgrade to Java 17 and Spring Framework 6. Switch to JakartaEE 9 version of the Servlet API. Drop support for Joda Time.

Configure Kotlin plugin to target JDK 1.8 as it doesn't support 17, yet.
2022-01-14 12:05:11 +01:00
Oliver Drotbohm
c5b3857e1c #1749 - Prepare changelog. 2022-01-14 10:03:24 +01:00
Oliver Drotbohm
004c46be3b #1727 - Prevent premature base encoding in UriTemplate if host is templated. 2021-12-10 10:50:05 +01:00
Oliver Drotbohm
e65f296f6a #1729 - Added equals(…) and hashCode() methods to TypeBasedPayloadMetadata. 2021-12-10 10:37:36 +01:00
Oliver Drotbohm
7b46211790 #1714 - Update change log prior to release. 2021-11-11 15:24:20 +01:00
Oliver Drotbohm
c487fcc802 #1697 - Support for custom property types in HAL FORMS.
As per the discussion in mamund/hal-forms#88, the list of property types in HAL FORMS is not exhaustive. This means we cannot align them with HTML input types and even more so not drop anything not an HTML input type.

This is now implemented by switching to generic Strings in the HAL FORMS property DTO and directly piping the value originally registered on the affordance into it.
2021-11-02 00:15:11 +01:00
Oliver Drotbohm
07125638f4 #1696 - Re-instantiate conversion for request parameter template variables.
When adding a request parameter template variable and the URI part of the template already contains a request parameter we now automatically turn the variable type into request parameter continuation. That apparently got lost in the move to level 4 URI templates in #1583.
2021-10-28 20:42:55 +02:00
Oliver Drotbohm
2cac83fcef #1686 - Avoid serializing empty beans in EntityModel.
The unwrapping nature of EntityModel.getContent() does not work well with value that would result in an empty object being rendered. We now skip the rendering if failing for empty beans is disabled.
2021-10-19 13:54:18 +02:00
Oliver Drotbohm
59b861b158 #1682 - Update changelog prior to release. 2021-10-14 16:57:06 +02:00
Oliver Drotbohm
3d7458b5f6 #1662 - HAL FORMS template target must be a URL.
We now expand the affordance link before we add it to the HAL FORMS template.

Also see #1660.
2021-10-12 13:52:34 +02:00
Oliver Drotbohm
ab02d45b8e #1657 - Prevent IndexOutOfBoundException in WebConverters.
We now skip the registration of the default media type if no hypermedia types are activated in the first place. We previously assumed there'd be at least one media type configuration registered.
2021-10-12 13:14:08 +02:00
Oliver Drotbohm
f0a000a07e #1652 - Tighten contracts for parameter values in MethodLinkBuilderFactory.linkTo(…).
If a parameter array is given to MethodLinkBuilderFactory.linkTo(…) methods, we now verify its correct length in correspondence to the method given. If no parameters are given at all, we automatically create a parameter value array of the required length.
2021-09-24 16:36:53 +02:00
Oliver Drotbohm
fe1657386d #1648 - Removed further deprecations. 2021-09-21 17:46:04 +02:00
Oliver Drotbohm
690ea3e967 #1638 - Avoid trying to proxy Object for controller method dummy invocations.
On JDK 17, trying to proxy Object doesn't work anymore. We now simply return the interceptor that would've been applied to the proxy directly and detect that properly in requests to extract the LastInvocationAware instance.
2021-09-20 13:27:35 +02:00
Oliver Drotbohm
1ad6448c36 #1635 - Prepare changelog for 1.4 M3 release. 2021-09-16 15:06:28 +02:00
Oliver Drotbohm
60e7f2e04e #1608 - HAL FORMS templates now expose HTTP method in all caps.
See the RFC for details: https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1.
2021-09-16 15:03:44 +02:00