Commit Graph

839 Commits

Author SHA1 Message Date
Mark Paluch
ef7617cb6f DATAREST-1509 - Polishing.
Reduce Jenkins build to Java 8 + 14 for jackson-next profile. Simplify assertion style. Convert space indents to tabs.

Original pull request: #374.
2020-04-28 11:01:00 +02:00
Greg Turnquist
eaa70cdc77 DATAREST-1509 - Test against all ISO-8601 TZ formats.
Verify that Jackson properly serializes to ISO-8601 format, which includes three potential timezone endings. Expand CI testing against both Jackson 2.10 and 2.11. Also test these profiles against JDK 8, 11, and 14.

Related: spring-projects/spring-data-build#1075
Original pull request: #374.
2020-04-28 11:00:53 +02:00
Oliver Drotbohm
7c10768501 DATAREST-1513 - Avoid superflous instantiations of EmbeddedResourcesAssembler. 2020-04-28 00:31:29 +02:00
Oliver Drotbohm
399c846378 DATAREST-1479 - Patching collections now also works for nested collections.
We now properly use the PropertyPath's leaf property to check whether we need to deal with a collection in JSON Patch pointers.
2020-04-27 23:52:55 +02:00
Mark Paluch
0f81b110fc DATAREST-1492 - Prepare next development iteration. 2020-03-31 15:08:04 +02:00
Mark Paluch
638e3f875f DATAREST-1492 - Release version 3.3 RC1 (Neumann). 2020-03-31 14:59:41 +02:00
Oliver Drotbohm
db5995eee0 DATAREST-762 - Collection resource's base link now forwards parameters.
We now use the current request's URI as base link for all links created for a collection resource. This especially has effect in the creation of pagination links as we now carry potentially applied critierias (induced by our Querydsl based filtering support) forward to the navigation links generated.
2020-03-30 22:50:21 +02:00
Oliver Drotbohm
4c17d54e9a DATAREST-1499, DATAREST-1500 - Cleanups.
Moved off Spring Framework deprecations for HttpMessageNotReadableException. This required some rearrangements of method signatures for types (hopefully) exclusively used by internal abstractions (some public, but not very friendly for user extension in the first place).

Switched to consistent use of Pageable.unpaged() instead of null. Switched to the use of new factory methods in Spring HATEOAS. Some Java 8 based improvements in request handling to simplify the implementation code. Deprecation of code that got obsolete due to the use of the factory methods.

Moved off some deprecations in Jackson APIs.

Removed a couple of unused imports. General avoidance of common warnings. Suppression where needed. Removed dead code in configuration.
2020-03-27 14:16:47 +01:00
Jens Schauder
cd11f47fc0 DATAREST-1482 - Prepare next development iteration. 2020-03-11 09:57:41 +01:00
Jens Schauder
d31ecc7503 DATAREST-1482 - Release version 3.3 M4 (Neumann). 2020-03-11 09:47:07 +01:00
Mark Paluch
abedcd130a DATAREST-1491 - Adapt to Mockito 3.3 changes. 2020-03-11 09:34:57 +01:00
Thomas Mrozinski
07039a2838 DATAREST-1068 - Resize array during merge.
When merging new data into a PersistentEntity, JsonNodes of array types were deserialized into immutable Lists, but the list is later mutated if the source and target arrays are of different sizes. This commit ensures that an array is deserialized into a mutable list.

Original pull request: #371.
2020-02-26 09:59:21 +01:00
Mark Paluch
7fb881fa23 DATAREST-1478 - Prepare next development iteration. 2020-02-12 15:04:21 +01:00
Mark Paluch
b09744fe31 DATAREST-1478 - Release version 3.3 M3 (Neumann). 2020-02-12 14:47:16 +01:00
Mark Paluch
7e2b0d4b9f DATAREST-1476 - Prepare next development iteration. 2020-01-17 09:47:49 +01:00
Mark Paluch
2e31e3c33d DATAREST-1476 - Release version 3.3 M2 (Neumann). 2020-01-17 09:39:03 +01:00
Mark Paluch
589b37eb8a DATAREST-1432 - Prepare next development iteration. 2020-01-16 16:11:54 +01:00
Mark Paluch
5c1d92ab95 DATAREST-1432 - Release version 3.3 M1 (Neumann). 2020-01-16 16:05:23 +01:00
Oliver Drotbohm
d8c3394cd7 DATAREST-1470 - Switched to use factory methods of RepresentationModel types. 2020-01-14 14:51:18 +01:00
Mark Paluch
88f49da22f DATAREST-1467 - Update copyright years to 2020. 2020-01-07 09:02:59 +01:00
Oliver Drotbohm
2b8e7afbf3 DATAREST-1463 - Adapt to API changes in LinkBuilderSupport. 2019-12-09 10:21:13 +01:00
Oliver Drotbohm
9010a9d132 DATAREST-1458 - Fixed rendering of compact view to association resources.
The usage of text/uri-list as media type was entirely broken and not even advertised in the reference docs anymore. It's now again supported for both to-one and to-many associations via Collections. Maps are rejected as they cannot be rendered as list of URIs correctly. Updated reference documentation accordingly.

Added a custom MapModel implementation of RepresentationModel as apparently using Maps with EntityModel does not unwrap the content properly due to [0].

[0] https://github.com/FasterXML/jackson-databind/issues/171
2019-11-29 17:17:35 +01:00
Oliver Drotbohm
28f8e0d397 DATAREST-1440 - Revisited removal of fields in incoming payloads.
We now only remove fields from the payload in case there's no @JsonAnySetter on the target entity.
2019-11-04 09:09:59 +01:00
Oliver Drotbohm
8689c1bb5b DATAREST-1446 - Polishing.
Test cases.

Original pull request: #366.
2019-10-28 15:00:54 +01:00
Javier Grande Pérez
694079df04 DATAREST-1446 - DefaultExcerptProjector now declines presence of projection if metadata returns Optional.empty().
If no excerpt projection is exposed by the underlying ResourceMetadata, DefaultExcerptProjector now also properly declines its existence in ….hasExcerptProjection(…). Previously, it always indicated a presence as it improperly used a null check rather than calling Optional.isPresent().

Original pull request: #366.
2019-10-28 14:57:57 +01:00
Ľubomír Varga
202a8aa302 DATAREST-1356 - Fix updating single associations.
Correct a regression regarding association links. Introduce several test cases to prove this situation is fixed regarding PUTs for association links.

Source of the bug: 554d6cb27b (diff-1d7c16fe1992fef13a47fa8ab8599718L317) flips the criteria from "not single" to "single" without checking for related impacts.
2019-10-21 13:02:45 -05:00
Mark Paluch
7e7767464c DATAREST-1419 - Prepare next development iteration. 2019-09-30 16:17:28 +02:00
Mark Paluch
ee6c55bcc1 DATAREST-1419 - Release version 3.2 GA (Moore). 2019-09-30 15:51:07 +02:00
Oliver Drotbohm
384e0ed0cd DATAREST-1427 - Fixed handling of unpaged Pageable values. 2019-09-25 14:27:00 +02:00
Mark Paluch
e510640619 DATAREST-1420 - Prepare next development iteration. 2019-09-06 10:21:54 +02:00
Mark Paluch
ffa93761c9 DATAREST-1420 - Release version 3.2 RC3 (Moore). 2019-09-06 10:10:42 +02:00
Greg Turnquist
0b0ffab46b DATAREST-1421 - Polishing. 2019-08-08 10:54:53 -05:00
Greg Turnquist
9c56c3f217 DATAREST-1421 - Deprecate ALPS_JSON and ALPS_JSON_VALUE.
Instead, use Spring HATEAOS's MediaTypes.ALPS_JSON and ALPS_JSON_VALUE.
2019-08-08 10:54:45 -05:00
Mark Paluch
d936712cce DATAREST-1396 - Prepare next development iteration. 2019-08-05 15:53:01 +02:00
Mark Paluch
9704937ed8 DATAREST-1396 - Release version 3.2 RC2 (Moore). 2019-08-05 15:35:35 +02:00
Oliver Drotbohm
244c57f712 DATAREST-1414 - Use I18N facilities of Spring HATEOAS more intensively.
We now rely on the MessageResolver capabilities of Spring HATEOAS to benefit of the optimizations in resource bundle resolution. Tweaked a couple of tests to make sure they properly use the resolver resorting to the default message the MessageResourceResolvable exposes.
2019-07-31 18:19:00 +02:00
Mark Paluch
19c261d7d0 DATAREST-1410 - Migrate remaining tests to AssertJ. 2019-07-31 10:06:03 +02:00
Oliver Drotbohm
556e918ef7 DATAREST-1403 - CollectionResourceMapping.getExcerptProjection() now returns Optional. 2019-06-26 17:46:43 +02:00
Oliver Drotbohm
d7b66777da DATAREST-1393 - Introduce workaround for Jackson property customization bug.
Deserializer customizations for related resources (deserializing an instance from a URI) are not applied to the creator properties Jackson uses to create an entity instance in the first place (see [0] for details). We work around this now by tweaking the property instances used for that in their origin ValueInstantiator via reflection until the bug gets fixed.

[0] https://github.com/FasterXML/jackson-databind/issues/2367
2019-06-25 16:00:39 +02:00
Oliver Drotbohm
788422f3eb DATAREST-1397 - Polishing.
Removed the redeclaration of hasCorsConfigurationSource(…) in RepositoryRestHandlerMapping as it already inherits the one from BasePathAwareRestHandlerMapping.
2019-06-21 15:40:07 +02:00
Mark Paluch
5eba301d62 DATAREST-1397 - Adapt to CORS changes in AbstractHandlerMapping.
We now enable CORS handling for all requests by overriding the newly introduced hasCorsConfigurationSource method. We cannot detect CORS configuration handling solely on the handler but require path headers to resolve repository interface mappings.
2019-06-21 15:40:07 +02:00
Mark Paluch
9f7c82e2c8 DATAREST-1398 - Integrate nohttp tooling into CI build profile. 2019-06-18 10:10:00 +02:00
Christoph Strobl
532cfd53f4 DATAREST-1364 - Prepare next development iteration. 2019-06-14 15:12:51 +02:00
Christoph Strobl
0c0df55e89 DATAREST-1364 - Release version 3.2 RC1 (Moore). 2019-06-14 14:44:26 +02:00
Oliver Drotbohm
7ea19bdc5b DATAREST-1394 - Upgrade to Spring Plugin 2.0 M2. 2019-06-14 01:48:21 +02:00
Oliver Drotbohm
b84aa1779c DATAREST-1390 - Remove temporary workaround after upgrade to Spring 5.2 M3.
This reverts commit 8ce25f7918.
2019-06-14 01:40:48 +02:00
Oliver Drotbohm
8ce25f7918 DATAREST-1390 - Temporary workaround for regression in Spring 5.2 snapshots. 2019-06-06 13:49:15 +02:00
Oliver Drotbohm
a506520c80 DATAREST-1388 - RepositoryRestMvcConfiguration now reuses RepresentationModelProcessorInvoker from Spring HATEOAS. 2019-06-05 23:47:36 +02:00
Oliver Drotbohm
ac72c8c91e DATAREST-1387 - DelegatingHandlerMapping now handles HttpMediaTypeNotSupportedException. 2019-06-05 23:38:35 +02:00
Oliver Drotbohm
e744c1c94f DATAREST-1386 - Add HAL Explorer module
We now ship a module containing the HAL Explorer [0] as an alternative to the HAL Browser which seems to be mostly out of maintenance and the WebJar refers to a jQuery version with a CVE. The new module still contains some customization code that we had in place for the browser to customize the POST/PUT forms to use the JSON Schema exposed for the aggregates.

The HAL Browser extension is now deprecated in the form that its inclusion causes a warn log to recommend switching to the explorer. A couple of general coding improvements: package scope for controllers and handler methods. Better use of constants and newer request mapping annotations.

Tweaked the configuration of static resource handlers to resolve the implicit cyclic dependency between the browser/explorer and the WebMVC module by introducing a Spring Factories backed extension SPI.

[0] https://github.com/toedter/hal-explorer
2019-06-05 11:54:19 +02:00