Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing forked repo #4

Merged
merged 281 commits into from
Oct 23, 2020
Merged

Refreshing forked repo #4

merged 281 commits into from
Oct 23, 2020

Conversation

mst-avaleo
Copy link
Member

No description provided.

gregturn and others added 30 commits June 28, 2019 06:19
Removed System.our.println from test case.
Adapted reference documentation section as well as the migration docs.
Fixed link to the section on the EntityLinks interface from the section of the LinkRelationProvider documentation.
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.
…n 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.
Reintroduced type apparently lost in the package restructuring. Adapted migration script to include the package rename in the migration.
* 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.
By letting the CI server assemble and publish documentation to docs.spring.io, we can ensure publicly posted docs are up-to-date.
…tation 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.
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.
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.
odrotbohm and others added 29 commits July 27, 2020 18:23
* ControllerLinkBuilder(Factory)
* IanaRels
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.
… 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.
This allows types like Spring Data's Streamable to be piped into the ….wrap(…) methods and immediately resolved into a collection.
Added equivalent overloads of merge(…) as well.
Include JSON:API and Siren implementations.
Additional unit tests to increase coverage.
Upgrade to Reactor 2020.0.0-M2, too.
Refer to Spring 5.3 instead of 5.2.
Maps, when wrapped inside an EntityModel, were getting double-rendered. Fix it so that they are only rendered once.
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.
@mst-avaleo mst-avaleo merged commit 9649396 into avaleo:master Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.