Commit Graph

644 Commits

Author SHA1 Message Date
Greg Turnquist
9ddfdc8639 #1061 - Polishing. 2019-09-16 09:21:26 -05:00
Greg Turnquist
11485d4cae #1070 - Continue development on 1.0.0.BUILD-SNAPSHOT. 2019-09-05 10:31:25 -05:00
Greg Turnquist
f4143c93fe #1070 - Releasing Spring HATEOAS 1.0.0.RC2. 2019-09-05 10:31:23 -05:00
Greg Turnquist
21c888ccf5 #1070 - Tweak release script. 2019-09-05 10:31:04 -05:00
Greg Turnquist
4ede5245eb #1070 - Update changelogs. 2019-09-05 10:16:49 -05:00
Oliver Drotbohm
91a34f2517 #1072 - Moved null value inclusion configuration to the getter of HalFormsTemplate.title. 2019-09-05 17:13:03 +02:00
Greg Turnquist
36baafe764 #1062 - Update reference docs to show EntityLinks are a Spring Web MVC feature.
For now, EntityLinks is only properly support for Spring Web MVC. Developing this for WebFlux is in progress. Properly indicate this in the reference docs.

Related: #1071
2019-09-05 10:00:53 -05:00
Greg Turnquist
fd70fd90d2 #1061 - Reenable default codecs for WebFlux configuration.
With Spring WebFlux properly handling custom codecs, no need to disable the default handlers.

This commit verifies WebFlux configuration in test cases, and also adds an equivalent set of test cases verifying Web MVC configuration as well.

Supercedes: #1047
2019-09-05 09:38:49 -05:00
Greg Turnquist
85fe81e3a2 #1067 - Remove @EnableEntityLinks. 2019-09-05 06:56:22 -05:00
Greg Turnquist
ef9a45dd53 #1058 - Migrate off deprecated Spring APIs. 2019-09-05 06:52:39 -05:00
Greg Turnquist
2ae4744a02 #1069 - Upgrade to Reactor Dyprosium-RC1. 2019-09-05 06:46:36 -05:00
Greg Turnquist
b0ea8ef29f #1066 - Upgrade to Spring Framework 5.2.0.RC2. 2019-09-05 06:44:46 -05:00
Greg Turnquist
28ecf0ce54 #1063 - Remove @EnableEntityLinks from documentation. 2019-09-03 09:17:25 -05:00
Greg Turnquist
e5669eefa0 #1059 - Polishing. 2019-08-31 08:15:38 -05:00
Greg Turnquist
fff5396a1c #1059 - Cleanup the core codebase.
Clean up code containing various patterns:

* Remove redundant `final`, `public`, and `static` declarations in interfaces and enums.
* Replace redundant `? extends Object` generic parameters with `?`.
* Convert collections to arrays using empty array instead of pre-sized one (modern JVM recommendation).
* Initialize collections using constructor call over `addAll`.
* Favor `addAll` over iterating and adding one-by-one.
* Take advantage of `Map.forEach` that was introduced with Java 8.
2019-08-30 17:43:07 -05:00
Greg Turnquist
9d83787a54 #1054 - Fix unresolved directive in reference docs.
Traverson section of client-side usage has a couple fragment pulled in the test suite that is failing. This fixes the prefix to properly resolve.
2019-08-14 10:24:25 -05:00
Greg Turnquist
ecbcdef870 #1044 - Restore visibility of UriTemplate constructors.
Visibility must only be removed after publishing a deprecated API.

See #1045 to track reducing the visibility of these constructor calls.
2019-08-06 10:30:25 -05:00
Greg Turnquist
c53b72f1cc #1030 - Continue development on 1.0.0.BUILD-SNAPSHOT. 2019-08-05 06:32:58 -05:00
Greg Turnquist
1395a21c55 #1030 - Releasing Spring HATEOAS 1.0.0.RC1. 2019-08-05 06:32:53 -05:00
Greg Turnquist
b7f3e11239 #1029 - Update changelog. 2019-08-05 06:30:20 -05:00
Greg Turnquist
bc4c5da8f3 #1042 - Upgrade to AssertJ 3.13.2. 2019-08-05 06:27:11 -05:00
Greg Turnquist
356a1c8b34 #1041 - Upgrade to JUnit 5.5.1. 2019-08-05 06:23:21 -05:00
Greg Turnquist
c0adee3e27 #1034 - Upgrade to Spring Framework 5.2.0.RC1. 2019-08-05 06:21:19 -05:00
Greg Turnquist
b6accb16ea #1039 - Don't render null ALPS attributes. 2019-08-05 06:19:34 -05:00
Greg Turnquist
2598142fc0 #1035 - Polishing. 2019-08-02 10:10:22 -05:00
Greg Turnquist
c6e777d486 #1035 - Upgrade to Reactor Dysprosium M3. 2019-08-02 10:05:00 -05:00
Greg Turnquist
6fafbb397b #1029 - Update changelog report for 1.0 RC1. 2019-08-02 09:52:43 -05:00
Greg Turnquist
6d17d7e949 #857 - Use List instead of Collection in configuration classes. 2019-08-01 16:27:39 -05:00
Greg Turnquist
9ba7f0179c #836 - Clarify that createResource is just user code in the reference documentation. 2019-07-31 12:23:02 -05:00
Greg Turnquist
feaa56a68c #987 - Drop UTF8 HAL media type. 2019-07-31 11:53:53 -05:00
Oliver Drotbohm
400a6bb703 #1019 - Improvements to I18N optimizations.
We now properly look for resource bundles by scanning for a resource bundle *pattern* instead of a plain file named rest-messages. Added integration tests to make sure that resource bundles are not skipped even if they existed.

Added the ability to define common messages in a rest-default-messages.properties, as Spring Data REST requires that and it would be too cumbersome for Spring Data REST to additionally deploy them in its own configuration.
2019-07-31 18:21:50 +02:00
Oliver Drotbohm
b1af903de0 #1021 - Removed explicit depends on to avoid Spring MVC reference in EntityLinksConfiguration. 2019-07-31 10:38:22 +02:00
Greg Turnquist
394519d48e #1026 - Polishing. 2019-07-30 16:39:45 -05:00
Greg Turnquist
ae3ad0c700 #1026 - Upgrade to Jackson 2.9.9.20190727 using the BOM. 2019-07-29 09:06:24 -05:00
Oliver Drotbohm
a71aeeb4d1 #1019 - Further optimizations in case not I18N is enabled.
Introduced MessageResolver interface and moved all components previously referring to MessageSourceResolvable to it. This allows us to directly shortcut message resolution by providing a no-op instance in case our default resource bundle rest-messages does not exist and thus avoid the overhead of attempted message resolutions in that case.
2019-07-18 14:49:32 +02:00
Oliver Drotbohm
fc1b4a8b51 #1018 - HAL Forms properties customizable via annotations on representation model classes.
We now consider additional Jackson and JSR-303 annotations on representation models to enrich the HAL Forms template properties with additional information:

- @NotNull on a property flips its `required` flag to `true`.
- The "regexp" attribute of @Pattern on a property is forwarded into the "regex" field.
- @JsonProperty(Access.READ_ONLY) on a property is translated into the "readOnly" flag.

The default for the "required" flag have been changed to false even for PUT and POST as whether they're required or not is completely determined by the model, not the HTTP method.

All of this is backed by significant refactoring in the way that Affordance instances are build internally. The new API is centered around the Affordances type in the mediatype package. The methods on Link to create the Affordance` from its details have been removed and replaced by builder style APIs on Affordance. AffordanceModelFactory has been moved to the mediatype as well.

PropertyUtils has been significantly revamped to expose a PayloadMetadata/PropertyMetadata model to abstract the individual traits of a property. This allows to optionally plug in the support for JSR-303 annotations. AffordanceModelFactory has been refactored to rather work with those instead of ResolvableType.
2019-07-18 13:07:58 +02:00
Greg Turnquist
ca68c7d1b2 #1024 - Publish documentation using CI server.
By letting the CI server assemble and publish documentation to docs.spring.io, we can ensure publicly posted docs are up-to-date.
2019-07-17 16:48:43 -05:00
Greg Turnquist
7cabc6aef7 #1023 - Update CI jobs.
* Only retain last 14 builds.
* Fix user.home on Docker builds
* Interact with `new-issue-branch` script properly by using `SNAPSHOT` as suffix for snapshot builds.
2019-07-17 09:57:23 -05:00
Oliver Drotbohm
ec8fba1dd5 #1020 - Re-introduce BasicLinkBuilder.
Reintroduced type apparently lost in the package restructuring. Adapted migration script to include the package rename in the migration.
2019-07-17 14:44:06 +02:00
Oliver Drotbohm
9e9221c325 #1022 - Deprecate @EnableEntityLinks. 2019-07-17 14:22:23 +02:00
Oliver Drotbohm
b21c362111 #1021 - Tweak setup of @EnableEntityLinks to make sure it only runs on Spring WebMVC.
We now clearly separate the beans registered by configuration backing @EnableEntityLinks into the ones that depend on Spring MVC being used and commonly shared ones. Tweaked the setup of @EnableHypermediaSupport to rather include the individual configuration classes instead of using @EnableEntityLinks directly as that would always pull WebMVC specific components.
2019-07-17 14:22:23 +02:00
Oliver Drotbohm
ff6380063c #1019 - Avoid exceptions on HAL link title rendering.
HalLinkRelation now implements MessageSourceResolvable.getDefaultMessage() returning an empty String to avoid NoSuchMessageExceptions for every resolution not backed by an actual translation. Tweaked serialization configuration for HalLink to not render empty title strings.
2019-07-15 22:39:10 +02:00
Oliver Drotbohm
4c434aab2b #1016 - Polishing.
Fixed link to the section on the EntityLinks interface from the section of the LinkRelationProvider documentation.
2019-07-09 13:05:15 +02:00
Oliver Drotbohm
36d2e8c2f4 #1016 - Fix documentation on RelProvider, now LinkRelationProvider.
Adapted reference documentation section as well as the migration docs.
2019-07-09 12:19:23 +02:00
Oliver Drotbohm
81b685d196 #1014 - Polishing.
Javadoc.
2019-07-02 20:06:48 +02:00
Oliver Drotbohm
d1a06bbcc8 #1014 - Added API to conditionally add links to RepresentationModel.
This allows more fluent usage of the API.
2019-07-02 20:05:07 +02:00
Oliver Drotbohm
8af96d9277 #1013 - Upgrade to JUnit 5.5. 2019-07-01 10:27:25 +02:00
Oliver Drotbohm
ac065158d5 #859 - Polishing.
Removed System.our.println from test case.
2019-07-01 10:27:25 +02:00
Greg Turnquist
1396f0313c #1011 - Add timeouts to CI pipeline. 2019-06-28 11:46:48 -05:00
Greg Turnquist
0c048d399d #445 - Polishing. 2019-06-28 11:40:52 -05:00