Commit Graph

644 Commits

Author SHA1 Message Date
Oliver Drotbohm
205bde8a7d 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:30 +02:00
Oliver Drotbohm
37b25008b0 DATAREST-1397 - Polishing.
Removed the redeclaration of hasCorsConfigurationSource(…) in RepositoryRestHandlerMapping as it already inherits the one from BasePathAwareRestHandlerMapping.

Removed @Override on BasePathAwareRestHandlerMapping.hasCorsConfigurationSource(…) as we need to compile against Spring 5.1, which doesn't expose the method. Downgrades from Spring HATEOAS 1.0 API usage in tests.
2019-06-21 15:39:56 +02:00
Mark Paluch
4e586495f4 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:23:42 +02:00
Christoph Strobl
bf3929e35c DATAREST-1378 - Prepare next development iteration. 2019-06-14 13:14:50 +02:00
Christoph Strobl
4291209067 DATAREST-1378 - Release version 3.1.9 (Lovelace SR9). 2019-06-14 12:39:34 +02:00
Oliver Drotbohm
bf8e062d37 DATAREST-1387 - DelegatingHandlerMapping now handles HttpMediaTypeNotSupportedException. 2019-06-05 23:49:15 +02:00
Mark Paluch
8acd867ba0 DATAREST-1351 - URL Cleanup. 2019-06-05 11:31:09 +02:00
Oliver Drotbohm
e5018e003c DATAREST-1382 - Avoid to call BackendIdConverter if no id used for the request mapping.
Contrary to what's stated in the Javadoc of BackendIdConverter, BackendIdConverterHandlerMethodArgumentResolver now skips the invocation of ….fromRequestId(…) if no identifier path variable is found for the mapping of the method invoked.
2019-06-04 23:46:19 +02:00
Oliver Drotbohm
cf18d6aff7 DATAREST-1381 - Polishing. 2019-06-04 23:39:41 +02:00
Oliver Drotbohm
f3b1d92c22 DATAREST-1381 - Improve documentation around @RepositoryRestController. 2019-06-04 23:39:39 +02:00
Oliver Drotbohm
a5308f193b DATAREST-1383 - Polishing.
Avoid repeated lookups of PersistentPropertyAccessor in DomainObjectReader for PATCH requests. Formatting.
2019-05-28 17:29:39 +02:00
Oliver Drotbohm
c616c53905 DATAREST-1383 - PATCH requests now skip application of values for backend read-only properties.
MappedProperties now immediately drops non-writable properties when created for deserialization. Previously those properties would have to be annotated with @JsonProperty(access = Access.READ_ONLY) explicitly to avoid them being considered.
2019-05-28 17:29:38 +02:00
Mark Paluch
43abfa7617 DATAREST-1374 - Prepare next development iteration. 2019-05-13 14:58:45 +02:00
Mark Paluch
f8ff5e7593 DATAREST-1374 - Release version 3.1.8 (Lovelace SR8). 2019-05-13 13:25:53 +02:00
Oliver Drotbohm
81d438d74b DATAREST-1360 - Prepare next development iteration. 2019-05-10 12:55:58 +02:00
Oliver Drotbohm
e38af5c228 DATAREST-1360 - Release version 3.1.7 (Lovelace SR7). 2019-05-10 12:18:52 +02:00
Oliver Drotbohm
541d62007a DATAREST-1344 - Prepare next development iteration. 2019-04-01 20:55:12 +02:00
Oliver Drotbohm
daaff4ade6 DATAREST-1344 - Release version 3.1.6 (Lovelace SR6). 2019-04-01 20:04:13 +02:00
Spring Operator
ff768baccc DATAREST-1351 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 396 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0.html with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.html ([https](https://www.apache.org/licenses/LICENSE-2.0.html) result 200).

Original Pull Request: #335
2019-03-22 10:26:37 +01:00
Oliver Drotbohm
e363bc3fff DATAREST-1354 - Polishing. 2019-03-20 17:24:51 +01:00
Oliver Drotbohm
0e071a3afc DATAREST-1354 - Avoid exceptions for missing enum value translations.
We now use a dedicated implementation of MessageSourceResolvable to avoid missing enum value translations actually causing exceptions. That also allows us to defer the calculation of the default (potentially translated in a default way).
2019-03-20 17:24:47 +01:00
Spring Operator
725e868563 DATAREST-1351 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 13 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://www.pivotal.io with 2 occurrences migrated to:
  https://www.pivotal.io ([https](https://www.pivotal.io) result 301).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 26 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 13 occurrences

Original pull request: #312
2019-03-18 11:46:41 -05:00
Oliver Drotbohm
2d76187ae0 DATAREST-1338 - JsonPatch handling is now able to traverse maps.
We're now able to correctly identify Map keys within JsonPatch paths so that e.g. people/Dave/name properly translates into a people['Dave'].name SpEL expression.

Streamlined the design of SpelPath to avoid duplicate parsing and properly express the difference between typed and untyped paths in the type hierarchy. Slightly refactored the type hierarchy so that only methods that make sense in either untyped or typed state appear on the instance returned (getLeafType(Class) was exposed on TypedSpelPath before, which was confusing).
2019-03-05 13:55:10 +01:00
Mark Paluch
37ca7290cf DATAREST-1336 - Prepare next development iteration. 2019-02-13 11:24:21 +01:00
Mark Paluch
0467b62e43 DATAREST-1336 - Release version 3.1.5 (Lovelace SR5). 2019-02-13 09:56:39 +01:00
Oliver Drotbohm
fd59f323e3 DATAREST-1332 - Polishing. 2019-02-07 20:57:48 +01:00
Oliver Drotbohm
0249726507 DATAREST-1332 - Fixed regression in CORS request handling.
The lookup of the RequestMappingInfo in exposeEffectiveLookupPathKey(…) yields null for CORS preflight requests to resources that do not support OPTIONAL explicitly. We now guard against that to avoid a subsequent NullPointerException.
2019-02-07 20:57:45 +01:00
Mark Paluch
0cb313e5d0 DATAREST-1309 - Prepare next development iteration. 2019-01-10 13:48:11 +01:00
Mark Paluch
1e3050e41a DATAREST-1309 - Release version 3.1.4 (Lovelace SR4). 2019-01-10 12:35:56 +01:00
Oliver Drotbohm
a5ee6eaf05 DATAREST-1321 - Lookup types can now produce non-String reference values.
Previously we assumed lookup types to always result in String based values. We now loosen that constraint to also allow other scalar types, mostly targeting numeric types like long and integer.
2019-01-08 11:50:15 +01:00
Mark Paluch
2cdac36253 DATAREST-1330 - Update copyright years to 2019. 2019-01-02 12:17:33 +01:00
Oliver Drotbohm
15056f1320 DATAREST-1322 - Fix proxy detection for Hibernate 5+ compatibility.
Switched to Spring Data Commons' ProxyUtils for a proxy detection mechanism that supports Hibernate 5 proxies.
2018-12-20 17:17:33 +01:00
Mark Paluch
e3c8553311 DATAREST-1298 - Prepare next development iteration. 2018-11-27 14:23:34 +01:00
Mark Paluch
b77385334b DATAREST-1298 - Release version 3.1.3 (Lovelace SR3). 2018-11-27 13:43:25 +01:00
Mark Paluch
5d66f2979c DATAREST-1291 - Prepare next development iteration. 2018-10-29 13:59:16 +01:00
Mark Paluch
d14014ab2c DATAREST-1291 - Release version 3.1.2 (Lovelace SR2). 2018-10-29 12:53:52 +01:00
Oliver Gierke
ad16d6308d DATAREST-1294 - Polishing.
Aligned with general request attribute naming conventions and prefixed the one we now use with the class' name. Altered the local attribute name to EFFECTIVE_REPOSITORY_RESOURCE_LOOKUP_PATH.

Renamed the constant holding the name from …_KEY to …_ATTRIBUTE.
2018-10-18 15:58:54 +02:00
Oliver Gierke
ffb38a067e DATAREST-1294 - Expose effective repository lookup path as request attribute.
We now expose a partially resolved PathPattern to contain the explicit repository base path so that the subpaths can be grouped around the individual repositories exposed.

Related ticket: spring-projects/spring-boot#14872
2018-10-18 12:43:44 +02:00
Mark Paluch
68696191db DATAREST-1287 - Prepare next development iteration. 2018-10-15 11:12:13 +02:00
Mark Paluch
7a7bb8f2e4 DATAREST-1287 - Release version 3.1.1 (Lovelace SR1). 2018-10-15 10:42:05 +02:00
Mark Paluch
94852c30fc DATAREST-1277 - Prepare next development iteration. 2018-09-21 07:46:16 -04:00
Mark Paluch
e96904414b DATAREST-1277 - Release version 3.1 GA (Lovelace). 2018-09-21 07:08:39 -04:00
Oliver Gierke
d243be79da DATAREST-1267 - Prepare next development iteration. 2018-08-20 10:56:52 +02:00
Oliver Gierke
b2da264bea DATAREST-1267 - Release version 3.1 RC2 (Lovelace). 2018-08-20 10:40:11 +02:00
Oliver Gierke
88b73de3b7 DATAREST-1274 - JsonPatch paths now properly verify multi-digit indexes. 2018-08-08 08:44:43 +02:00
Oliver Gierke
5635479dd1 DATAREST-1248 - SortTranslator now considers read-only properties sortable.
MappedProperties now exposes a factory method that uses the Jackson introspector for serialization (instead of deserialization) which now also includes read-only properties. Previously, read-only ones were not considered as they are excluded from the metadata if it is looked up for deserialization.
2018-08-07 15:43:50 +02:00
Oliver Gierke
501ddda59f DATAREST-1273 - Properly support adding to collections via indexes in JsonPatch expressions.
We now support adding a to a collection via JsonPatch expressions by using the collection's size as target index. Contrary to paths pointing to existing collection elements we cannot determine the type of the object to be created. Thus, we fall back to the common element type of all existing collection elements. We also reject indexes pointing to elements with an index greater than the current collection's size.
2018-08-07 10:47:41 +02:00
Mark Paluch
fd5cb8342a DATAREST-1245 - Prepare next development iteration. 2018-07-26 12:32:25 +02:00
Mark Paluch
a9aeb856fd DATAREST-1245 - Release version 3.1 RC1 (Lovelace). 2018-07-26 12:06:35 +02:00
Oliver Gierke
429706a77e DATAREST-1260 - Tweaked DomainObjectReader to support immutable entities.
DomainObjectReader now aborts the recursive merges in case it encounters an entity that's described as @Immutable (just introduced in Spring Data Commons).

Fixed some generics and removed DomainObjectMerger as it's unused.

Related ticket: DATACMNS-1322.
2018-07-12 10:30:54 +02:00