Commit Graph

874 Commits

Author SHA1 Message Date
Oliver Drotbohm
60bf4e92ff #1405 - Use ConcurrentLruCache for affordances.
We now use a ConcurrentLruCache limited to 256 entries instead of a ConcurrentReferenceHashMap to cache Affordance instances to prevent the cache from growing unboundedly before GC kicks in.
2021-01-20 20:30:30 +01:00
Oliver Drotbohm
752b000e6c #1427 - Support for the target attribute of HAL FORMS templates.
We now explicitly set the target attribute of HAL FORMS templates if the target of the affordance does not equal the target of the self link.
2021-01-20 19:12:43 +01:00
Oliver Drotbohm
675f9e3895 #1439 - Support for HAL FORMS min, max, minLength and maxLength attributes.
Introduce support for the min, max, minLength and maxLength fields for HAL FORMS property descriptors. Extended PropertyMetadata to capture those based on JSR-303 annotations.

Pulled up InputPayloadMetadata.createProperties(…) into AffordanceModel directly. Deprecated InputPayloadMetadata.applyTo(…).
2021-01-20 17:17:51 +01:00
Oliver Drotbohm
a16c54f7b3 #1438 - Support for HAL FORMS' placeholder template properties.
See the spec [0] for details. Significant rework of how an AffordanceModel and HalFormsAffordanceModel in particular translates into creating a representation that matches the affordance (see InputPayloadMetadata.createProperties(…)).

[0] https://rwcbook.github.io/hal-forms/#_code_placeholder_code
2021-01-19 17:39:22 +01:00
Oliver Drotbohm
6ad9012047 #1428 - Avoid rendering curies if none is available.
If CurieProvider.getCurieInformation(Links) returns an empty list of curies, we now don't render curies at all.
2021-01-18 17:35:58 +01:00
Oliver Drotbohm
c44c0e963a #1371 - EntityModel now explicitly rejects types rendered as @JsonValue.
It doesn't make sense to wrap an object to be rendered as value into an EntityModel as the latter will end up as JSON Object and thus, the representation of the target object *needs* to consist of key-value pairs.

Previously we just produced invalid JSON which ultimately failed as well.
2021-01-18 16:44:27 +01:00
Oliver Drotbohm
a1481d8302 #1430 - Continue development on 1.3.0-SNAPSHOT. 2021-01-13 11:56:20 +01:00
Oliver Drotbohm
4f27901f79 #1430 - Releasing Spring HATEOAS 1.3.0-M1. 2021-01-13 11:56:18 +01:00
Oliver Drotbohm
1dc743e622 #1430 - Fix repository declarations. 2021-01-13 11:52:18 +01:00
Oliver Drotbohm
49be6bae5f #1430 - Update changelog. 2021-01-13 11:48:51 +01:00
Oliver Drotbohm
35a6048dd7 #1433 - Upgrade to Spring Framework 5.3.3. 2021-01-13 11:48:19 +01:00
Greg L. Turnquist
975f1ff7fd #475 - Support all variable formats.
RFC-6570 specifies percent-encoding as a valid way to encode characters. By expanding the regex for UriTemplate to include '%', it's possible to support all variants.

See: https://tools.ietf.org/html/rfc6570#section-2.3

Original issue: #246
2021-01-13 10:57:41 +01:00
Oliver Drotbohm
0db2bb551f #1425 - Fix evaluation of nested generics in RepresentationModelProcessor.
The code handling CollectionModel types now also checks for the element type being a RepresentationModel instance and checking whether the detected collection element matches the declared type.
2021-01-13 10:16:05 +01:00
koehnj
646c52886d #1425 - Unit test to reproduce problem. 2021-01-13 10:16:05 +01:00
Oliver Drotbohm
f7f2ae03fc #1430 - Update license headers for 2021. 2021-01-13 09:55:24 +01:00
Oliver Drotbohm
7a86ea4b31 #1424 - More syntactic sugar for MvcLink. 2020-12-22 14:46:44 +01:00
Oliver Drotbohm
0cfbd7b414 #1423 - Undeprecate HalFormsConfiguration.withPattern(…).
It's the replacement method for registerPattern(…) returning a fresh instance.
2020-12-22 14:35:46 +01:00
Greg L. Turnquist
13a51c5819 #1417 - Release directly to maven central.
By removing our need to use bintray for releases and instead deploying directly to maven central, we can reduce the risk of issues.
2020-12-18 12:42:06 -06:00
Greg L. Turnquist
0fded5c032 #1416 - Use proper build plugins. 2020-12-16 12:10:25 -06:00
Oliver Drotbohm
93dfe16800 #1412 - Discovered mappings now get regex matchers removed.
We now remove potentially used regular expression matchers from template variables to avoid the to show up in links generated for the templates.
2020-12-12 17:43:28 +01:00
Oliver Drotbohm
fc9d2a6777 #1399 - Make sure curie information is rendered for pre-curied links.
We previously didn't render the curie information if the process of curying didn't actually change the link relation if it was already given in a curied form. We now check preprocessed link relation for a curie and include the curie information if we find a curie.
2020-11-23 13:48:15 +01:00
Greg L. Turnquist
3bd1df42b6 #1385 - Add Jenkins badge for 1.2.x to README. 2020-10-29 11:37:20 -05:00
Greg L. Turnquist
e48c19a099 #1388 - Properly parse new version format. 2020-10-29 11:20:56 -05:00
Oliver Drotbohm
e2aa9126fa #1379 - Proper type resolution for CollectionModel post-processing.
CollectionModelProcessorWrapper erroneously returned a raw type in case a CollectionModel type assignment check failed which rendered the element type verification to always match as it's effectively compared against Object.

We're now returning null to rather proceed with the next candidate type.
2020-10-28 22:41:36 +01:00
Oliver Drotbohm
568d46e9ac #1385 - Continue development on 1.3.0-SNAPSHOT. 2020-10-27 21:15:57 +01:00
Oliver Drotbohm
840dcbb45d #1385 - Releasing Spring HATEOAS 1.2.0. 2020-10-27 21:15:55 +01:00
Oliver Drotbohm
41a6b883b0 #1385 - Update changelog for 1.2 GA. 2020-10-27 21:15:01 +01:00
Oliver Drotbohm
b00774a480 #1384 - Upgrade to Spring Framework 5.3.
Other dependencies as well.

Tweaked the test verifying the WebFlux exchange strategies registered after some refactorings in Spring Framework.
2020-10-27 21:00:01 +01:00
Oliver Drotbohm
03abd3f169 #1382 - Polishing.
Let HalForms register a custom ObjectMapper customizer to allow separate customizations. If HAL and HAL Forms are supposed to be customized the same way, the same customizer can be registered on both instances. Tweak the application of the customizer to happen inside the configuration classes, not on the outside.

Prepare HalFormsConfiguration to become a fully immutable type in 1.3. Javadoc and assertion polish.

Original pull request: #1383.
2020-10-27 20:34:34 +01:00
Greg L. Turnquist
89fade21c2 #1382 - Add ability to customize the ObjectMapper for HAL and HAL-FORMS.
Use HalConfiguration to allow applying customizations to the ObjectMapper.

Original pull request: #1383.
2020-10-27 20:34:34 +01:00
Oliver Drotbohm
0643624e7c #1379 - Test cases to show that what's described is generally working. 2020-10-27 19:55:15 +01:00
Greg L. Turnquist
146edbc13e #1367 - Continue development on 1.2.0-SNAPSHOT. 2020-09-15 12:36:41 -05:00
Greg L. Turnquist
4c040dda98 #1367 - Releasing Spring HATEOAS 1.2.0-RC1. 2020-09-15 12:36:36 -05:00
Greg L. Turnquist
e85b6082fe #1367 - Release Spring HATEOAS 1.2.0.RC1. 2020-09-15 12:33:37 -05:00
Greg L. Turnquist
38b4dcf317 #1366 - Upgrade to Spring Framework 5.3.0-RC1. 2020-09-15 12:27:53 -05:00
Oliver Drotbohm
367fbb9261 #1364 - Polishing. 2020-09-14 22:04:21 +02:00
Oliver Drotbohm
b8d9a15e67 #1364 - Document recommended visibility of media type configuration classes. 2020-09-14 22:04:06 +02:00
Greg L. Turnquist
6982fc30a7 #1358 - Update documentation links for JSON:API. 2020-09-01 20:31:37 -05:00
Oliver Drotbohm
1607994fd2 #1352 - Change in implementation strategy for Maps in EntityModel.
We now use a custom serializer for EntityModel.getContent() as we need that to still return the Map content for programmatic clients. The serializer skips maps entirely and programmatically unwraps all other content.

A simple Converter (@JsonSerialize(convert = …)) to filter Maps unfortunately didn't do the trick as that causes a a delegating serializer to be registered for the property and @JsonUnwrapped stops working as it's designed to work with bean serializers only.

Adapted test cases accordingly.

Original pull request: #1353.
2020-08-12 09:31:45 +02:00
Greg L. Turnquist
69c81f24e4 #1352 - Render Map entries once.
Maps, when wrapped inside an EntityModel, were getting double-rendered. Fix it so that they are only rendered once.
2020-08-11 23:28:34 +02:00
Greg L. Turnquist
b0dbbd56fa #1349 - Continue development on 1.2.0-SNAPSHOT. 2020-08-11 09:22:49 -05:00
Greg L. Turnquist
62a7ec86e7 #1349 - Releasing Spring HATEOAS 1.2.0-M1. 2020-08-11 09:22:41 -05:00
Greg L. Turnquist
8db9cf49b5 #1349 - Update changelog for 1.2 M1. 2020-08-11 09:20:53 -05:00
Oliver Drotbohm
b69a209584 #1349 - Fix reference to Spring Data documentation resources. 2020-08-11 11:59:59 +02:00
Oliver Drotbohm
9b645973b2 #1348 - Fix spring-next build profile.
Refer to Spring 5.3 instead of 5.2.
2020-08-11 11:47:01 +02:00
Oliver Drotbohm
5b4f175063 #1351 - Upgrade to Jackson 2.11.2. 2020-08-11 11:35:58 +02:00
Oliver Drotbohm
5eeedf0415 #1350 - Upgrade to Kotlin 1.4 RC. 2020-08-11 11:35:58 +02:00
Oliver Drotbohm
e80f087def #1349 - Use Spring Data build resources in version 2.4. 2020-08-11 11:35:58 +02:00
Oliver Drotbohm
f07bbb4a81 #1348 - Upgrade to Spring Framework 5.3 M2.
Upgrade to Reactor 2020.0.0-M2, too.
2020-08-11 11:35:58 +02:00
Greg L. Turnquist
59aed85e9a #1337 - Polishing. 2020-07-30 15:21:08 -05:00