Commit Graph

849 Commits

Author SHA1 Message Date
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
Oliver Drotbohm
9b8971a1df #1341 - Added Links.addIf(boolean, Link...).
Additional unit tests to increase coverage.
2020-07-29 21:42:34 +02:00
Greg L. Turnquist
b4ce7283a5 #1337 - List community-led media types in ref docs.
Include JSON:API and Siren implementations.
2020-07-29 11:15:48 -05:00
Oliver Drotbohm
e6262825b3 #1340 - Added Links.and(Stream<Link>).
Added equivalent overloads of merge(…) as well.
2020-07-29 14:52:09 +02:00
Oliver Drotbohm
a14e592bfa #1322 - Rename Links.and(boolean, …) to ….andIf(boolean, …). 2020-07-29 09:48:50 +02:00
Oliver Drotbohm
6453d25263 #1335 - Support for Supplier<Stream<?> expansion in EmbeddedWrappers.
This allows types like Spring Data's Streamable to be piped into the ….wrap(…) methods and immediately resolved into a collection.
2020-07-28 22:28:40 +02:00
Greg L. Turnquist
4720e563f0 #1304 - Update ref docs to properly show how to register custom media types.
Custom media types do NOT require registering a MediaTypeConfigurationProvider implementation with spring.factories. The reference docs must be updated to illustrate this. Also add to the javadocs so users are properly warned.
2020-07-28 14:58:51 -05:00
Oliver Drotbohm
035b742a1f #1335 - Added HalModelBuilder.embed(Stream<?> …).
HalModelBuilder is now able to take Stream instances directly immediately resolving them so that clients don't have to call ….collect(Collectors.toList()) all the time. Some internal rearrangements and stricter null guarantees in EmbeddedWrappers.
2020-07-28 16:42:26 +02:00
Oliver Drotbohm
a5ccafc4da #1334 - Upgrade to Reactor Dysprosium SR10. 2020-07-27 18:43:03 +02:00
Oliver Drotbohm
68e750119f #1333 - Upgrade to Spring 5.2.8. 2020-07-27 18:42:05 +02:00
Oliver Drotbohm
646e73c8c5 #1329 - Removed APIs deprecated in 1.0.
* ControllerLinkBuilder(Factory)
* IanaRels
2020-07-27 18:23:06 +02:00
Oliver Drotbohm
5ea48dd332 #361 - Rearrange PropertyResolvingMappingDiscoverer.
Moved PropertyResolvingMappingDiscoverer into server.core package. Unified MappingDiscoverer arrangement in WebHandler and use it from there. Deprecated AnnotationBasedMappingDiscoverer to be able to make it package protected in 1.3.
2020-07-27 18:16:46 +02:00
Oliver Drotbohm
ffa1dc3539 #361 - Polishing.
Made implementation class package protected to not expose it. Avoid the use of Optional for hot code paths. Removed factory method as we only use the type internally anyway.

Removed test customizations as the discoverer is now just leniently opting out if not ApplicationContext can be found.

Original pull request: #1328.
2020-07-27 17:50:25 +02:00
Michele
c5f4bfa0b5 #361 - Implemented property resolving in link creation.
We now pipe the detected mapping through the PropertyResolver exposed by the ApplicationContext's Environment.

Original pull request: #1328.
2020-07-27 17:50:25 +02:00
Oliver Drotbohm
3a7798a912 #1291 - Polishing. 2020-07-27 13:06:24 +02:00
Greg Turnquist
5f625ede2d #1291 - Support alphanumeric logref for VndError.
According to https://github.com/blongden/vnd.error, logref is for "expressing a (numeric/alpha/alphanumeric) identifier". This patches `VndError` to support both strings and integers, ensuring each serializes properly.

NOTE: `VndErrors` has been deprecated due to the spec itself being dead since 2014. However, it must be supported until fully removed from Spring HATEOAS.

Original pull request: #1293.
2020-07-27 13:06:24 +02:00
Oliver Drotbohm
43528523eb #1314 - Polishing. 2020-07-24 08:48:32 +02:00
Oliver Drotbohm
2504ae3fac #1314 - HalLinkRelations now properly parses link relations with more than one colon.
Previously the parsing of link relations had assumed that a curie relation only consists of a single colon, thus, that a split by colon would always end up in two elements and only re-assembled these two elements. In case a URI that contains multiple colons handed into the parsing method, further segments had been dropped. We now remain everything following the first colon as local part of the URI.

Also, we now detect IANA registered URI schemes [0] and consider source relations starting with those as uncuried ones.

[0] https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
2020-07-24 08:46:28 +02:00
Oliver Drotbohm
f23f2399a3 #1287 - Polishing. 2020-07-23 22:50:32 +02:00
Oliver Drotbohm
348d6e4514 #1287 - Remove cache from UriTemplate in favor of better handling in Link.
We now avoid creating the UriTemplate instance for a Link if the Link does not contain curly braces in the first place. That allows us to remove the cache within UriTemplate in the first place.
2020-07-23 22:50:15 +02:00
Jay Bryant
65a692e33d #1319 - Language improvements in reference documentation. 2020-07-23 09:33:07 +02:00
vachillo
f1407b253e #1320 - Update Javadoc and toString() methods in renamed representation model classes. 2020-07-23 09:29:53 +02:00
Oliver Drotbohm
200ef443de #1323 - Polishing. 2020-07-23 09:27:27 +02:00
Oliver Drotbohm
e05d904fe1 #1323 - HalModelBuilder.build() now picks up call side generics. 2020-07-23 09:27:09 +02:00
Oliver Drotbohm
b560e5228a #1287 - Fixed potential memory leak when creating many links.
We now use a copy of Spring Framework's MimeTypeUtil's ConcurrentLruCache implementation to strictly only LRU cache 1024 instances of UriTemplate and fall back to creation if that size is exceeded.

This should solve the memory leak for now but should still be revisited across the Spring ecosystem.
2020-07-22 23:32:42 +02:00
Oliver Drotbohm
8af6b4c099 #1322 - Added Links.and(boolean, Supplier<Link>) to conditionally add links. 2020-07-19 18:32:31 +02:00