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.
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.
We now properly only answer PersistentEntitiesResourceMappings.hasMappingsFor(…) with true if we find a non-null value in the cache. Previously, even a failed attempt to create some ResourceMapping would've caused ….hasMappingsFor(…) to indicate it PersistentEntitiesResourceMappings contains a mapping.
This lead to downstream NullPointerExceptions as ….getMetadataFor(…) was accessed without a null guard after ….hasMappingFor(…) returned true.
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.
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
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.
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.