Commit Graph

995 Commits

Author SHA1 Message Date
Oliver Drotbohm
fc99a84439 #1639 - Javadoc polishing in preparation of stringer linting in JDK 17. 2021-09-21 14:20:50 +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
2fcad81d6c #1640 - Tweak CI build to run compatibility builds against JDK 17. 2021-09-20 13:14:06 +02:00
Oliver Drotbohm
56b4dcc255 #1637 - Upgrade to Lombok 1.18.20.
For JDK 17 support.
2021-09-20 13:11:36 +02:00
Oliver Drotbohm
95174ae911 #1635 - Continue development on 1.4.0-SNAPSHOT. 2021-09-16 15:07:20 +02:00
Oliver Drotbohm
21597fe1b9 #1635 - Releasing Spring HATEOAS 1.4.0-M3. 2021-09-16 15:07:17 +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
Oliver Drotbohm
f9274a692e #1634 - Upgrade to AssertJ 3.20.2. 2021-09-16 14:33:16 +02:00
Oliver Drotbohm
c5e297299f #1633 - Upgrade to EvoInflector 1.3. 2021-09-16 14:31:57 +02:00
Oliver Drotbohm
229e3829c3 #1632 - Upgrade to Logback 1.2.6. 2021-09-16 14:30:19 +02:00
Oliver Drotbohm
42b1f6aee3 #1631 - Upgrade to JaCoCo 0.8.7. 2021-09-16 14:28:58 +02:00
Oliver Drotbohm
ff2470b2bd #1630 - Upgrade to Jackson 2.12.5. 2021-09-16 14:27:28 +02:00
Oliver Drotbohm
19a997e163 #1629 - Upgrade to JUnit 5.8. 2021-09-16 14:26:01 +02:00
Oliver Drotbohm
fbebf8933b #1627 - Upgrade to Mockk 1.12.0. 2021-09-16 14:24:23 +02:00
Oliver Drotbohm
27b468ac76 #1628 - Upgrade to Slf4j 1.7.32. 2021-09-16 14:24:02 +02:00
Oliver Drotbohm
9d015b5599 #1626 - Upgrade to Kotlin 1.5.30 and Coroutines 1.5.2. 2021-09-16 14:21:13 +02:00
Oliver Drotbohm
ac7ee048be #1625 - Upgrade to Reactor 2020.0.11. 2021-09-16 14:18:11 +02:00
Oliver Drotbohm
5c28c769ed #1624 - Upgrade to Spring Framework 5.3.10. 2021-09-16 14:17:17 +02:00
Oliver Drotbohm
140ae541f6 #1609 - Avoid superfluous object creation in Link.valueOf(…).
We now avoid calling with…-methods for every attribute parsed from an RFC-8288 link string.
2021-09-16 11:28:00 +02:00
Oliver Drotbohm
2751b11acf #1607 - Polishing. 2021-09-14 11:43:31 +02:00
Oliver Drotbohm
7d763043d2 #1607 - Remove deprecations in Affordances. 2021-09-14 11:43:04 +02:00
Oliver Drotbohm
55aa4ff278 #1602 - Polish nullability for Link. 2021-09-14 10:17:26 +02:00
Oliver Drotbohm
cfd891ebf1 #1599 - Properly contextualize MapSuppressingUnwrappingSerializer.
According to FasterXML/jackson-databind#3272, we have to explicitly contextualize the delegate serializer we use for non-Map content in EntityModel.
2021-09-14 09:01:35 +02:00
Oliver Drotbohm
4705797322 #1402 - Properly create Property instances in PropertyUtils.
We now hand the already known property name (from the PropertyDescriptor) to the Property instance we create when inspecting classes for metadata. This avoids ambiguities stemming from the fact that Property assumes Java Bean style properties but Spring's BeanUtils also supporting Java Records style accessors. In special naming contexts like the one used in the test case, this can lead to properties considered "the same" as their accessor methods imply their name is the same.
2021-09-09 13:00:32 +02:00
Oliver Drotbohm
f891f3be6d #1598 - Fully prepare handler method values in link creation.
We now eagerly convert all request parameters and path variables into their String representation using the MVC ConversionService to make sure we can use all formatting metadata available on the parameters.
2021-08-27 17:41:47 +02:00
Oliver Drotbohm
7acf6b8485 #1595 - Continue development on 1.4.0-SNAPSHOT. 2021-08-12 10:25:26 +02:00
Oliver Drotbohm
848cdf1fbb #1595 - Releasing Spring HATEOAS 1.4.0-M2. 2021-08-12 10:25:18 +02:00
Oliver Drotbohm
8bec37c67c #1595 - Update changelog. 2021-08-12 10:24:31 +02:00
Oliver Drotbohm
748da756db #1591 - Polishing.
Port configuration lookup caching from HAL FORMS into HAL configuration.
2021-07-29 17:58:20 +02:00
Oliver Drotbohm
662dde692e #1591 - Support for custom media type aliases in HAL FORMS. 2021-07-29 17:58:20 +02:00
Oliver Drotbohm
db885baaff #1590 - Polishing. 2021-07-29 17:58:20 +02:00
Oliver Drotbohm
a1d2752dd0 #1590 - Support for explicit type information on CollectionModel.
We now allow explicit definition of a fallback collection element type on CollectionModel to be used in cases of an empty model, so that the RepresentationModelProcessor infrastructure can still reason about the element type and also invoke the processor for empty collection models.

Fixes #1590.
2021-07-29 17:58:17 +02:00
Oliver Drotbohm
db1cd5db16 #1485 - Ensure proper encoding for request parameter expansion.
We now use the encoding rules defined in RFC 6570 (URI templates, API introduced in #1583) to prepare request parameters added to the URIs rendered.
2021-07-28 22:42:08 +02:00
Oliver Drotbohm
d6d816d77b #1575 - Support for non-composite request parameters.
This commit introduces @NonComposite, an annotation to be used with collection or array typed @RequestParam handler method parameters. Using the annotation causes the rendering of request parameters to use the non-composite way of rendering URI template values (param=value1,value2) rather than the default, composite flavor of param=value1&param=value2.

A bit of polish in TemplateVariable, which now also exposes a prepareAndEncode(Object) method that renders a given value according to the rules defined in the URI template spec for the particular variable type and state (composite VS. non-composite).
2021-07-28 17:28:02 +02:00
Oliver Drotbohm
ce71b144a1 #1588 - WebMvcLinkBuilder.linkTo(Method, Object[]) now properly handles request parameters.
We now route calls to WebMvcLinkBuilder.linkTo(Method, Object[]) through the same infrastructure that linkTo(…) calls with a dummy method invocation are routed through. We construct a fake LastInvocationAware pointing to the given Method and parameters.
2021-07-21 10:02:51 +02:00
Oliver Drotbohm
a85952ebc1 #1587 - Continue development on 1.4.0-SNAPSHOT. 2021-07-14 23:33:22 +02:00
Oliver Drotbohm
394ed16778 #1587 - Releasing Spring HATEOAS 1.4.0-M1. 2021-07-14 23:33:13 +02:00
Oliver Drotbohm
ea720b4ba7 #1587 - Prepare 1.4 M1 release. 2021-07-14 23:32:28 +02:00
Oliver Drotbohm
84890d54a0 #1586 - Upgrade to Reactor 2020.0.9. 2021-07-14 23:25:09 +02:00
Oliver Drotbohm
8c619988f8 #1585 - Upgrade to Spring Framework 5.3.9. 2021-07-14 23:22:39 +02:00
Oliver Drotbohm
f99d94f0c7 #467 - Polishing.
General house keeping.

Original pull request: #1576.
2021-07-14 17:46:47 +02:00
Réda Housni Alaoui
445d5fd4d8 #467 - AnnotationMappingDiscoverer now considers @RequestMapping(params = …)
We now inspect the static request parameters declared in the actual request mapping and apply those values when building URIs pointing to those methods.

Original pull request: #1576.
2021-07-14 17:46:08 +02:00
Oliver Drotbohm
8c4824245e #1583 - Full support for level 4 URI templates.
Significant rewrite of UriTemplate to bring it up to level for template variables. We now additionally support:

* Composite values correctly
* Prefix values
* Multi-value template variables
* Path-style parameters
* Label expansion with dot-prefix
* Reserved expansion

Unit tests have been enriched with all examples given in the corresponding RFC [0]. Template variable types have been aligned with the terminology used in the RFC. Currently differently named types have been deprecated in favor of the new ones.

The commit slightly changes the behavior in two different aspects:

1. Query parameter values are now encoded as described in the RFC. Previously, special characters like comma (,) have not been percent encoded but now are. To create comma-separated values, expand an array of values instead of a prepared String. I.e. instead of expanding {?sort} with "foo,asc", expand it with [ "foo", "asc" ].

2. The aspect of variable optionality has been deprecated as it doesn't actually exist for template variables. This causes expansions that were previously rejected (e.g. ones using {foo} in paths) are now not rejected anymore. This is due to the way that the expansions are defined in the RFC.

[0] https://datatracker.ietf.org/doc/html/rfc6570
2021-07-14 17:32:03 +02:00
Greg L. Turnquist
fff452cf8a #1557 - Polishing. 2021-07-06 17:24:41 +02:00
Greg L. Turnquist
33e853cbb5 #1557 - Add support for @DecimalMin and @DecimalMax.
Add support for decimal-based type validation constraints.
2021-07-06 17:24:41 +02:00
Oliver Drotbohm
08bc96493e #1540 - Avoid double curie-ing of HalModel embeds.
Embedded elements assembled through a HalModelBuilder expose those through a CollectionModel to make sure that the individual elements get grouped by their link relation and those potentially curied. To indicate a curie link needing to be added because of curied embeds, the serialization adds a magic link to the list of links of that CollectionModel. As the latter is unwrapped, an additiona _links block rendering a curie had been added to the representation rendering the JSON representation invalid, as it now contained two _links fields (the latter stemming from the actual links added to the HAL representation model).

We now tweak the CollectionModel returned to override ….add(Link) and rather route the magic link to the outer representation model, causing the inner one to never accumulate any links in the first place and thus not render an invalid _links.
2021-06-30 10:59:31 +02:00
Kyle Hoehns
ce36feeb8c #1475 - Fix custom media type parser documentation.
Documentation for `HypermediaMappingInformation.getMediaTypes` expects to return a `List<MediaType>` which is not shown in the ref docs. Amend it with a proper parsing API as well as formatting.
2021-06-29 17:13:31 -05:00
larsw
5cf9fd1c29 #1562 - Add MARKDOWN as a supported Alps documentation format.
Per section 2.2.5 of the ALPS spec, `markdown` is a valid value for the `format` field.
2021-06-29 16:56:57 -05:00
Oliver Drotbohm
c6a6d370ad #1563 - Deprecate PayloadMetadata.getPropertyMetadata(…).
This method is currently used in test cases only and the just introduced ability to rename property makes the method not reliably usable as the way it is named doesn't convey which name is to be used. It currently is the potentially renamed value. Moving to the actual property name as input creates stronger boundaries to assume a type backing the metadata, which we want to avoid.
2021-06-29 16:15:24 +02:00