-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Labels
for: eclipsesomething that is specific for Eclipsesomething that is specific for Eclipsefor: vscodesomething that is specific for VSCodesomething that is specific for VSCodetheme: property-editing-supporttype: bug
Milestone
Description
Backport issue for #1605 for the 4.32.0
release:
management.endpoint.health.show-details=when_authorized
is flagged as an error, even though the Spring Boot internally converts when_authorized
correctly to Show.WHEN_AUTHORIZED
.
It looks like the validation logic around enum values for properties is currently:
- lower-case name of the enum with
-
instead of_
(when-authorized
does not show an error) - upper-case exact name of the enum (
WHEN_AUTHORIZED
does not show an error)
But the conversion logic in Spring Boot is a little different. It is located in LenientObjectToEnumConverterFactory
. It basically is:
- does the value match the exact enum value (in this case
WHEN_AUTHORIZED
) - if not, then strip all non-digit and non-letter characters, convert to lowercase, and find the enum value that way.
That results in:
when_authorized
is mapped toWHEN_AUTHORIZED
when-authorized
is mapped toWHEN_AUTHORIZED
WHEN-AUTHORIZED
is mapped toWHEN_AUTHORIZED
This should be reflected in the validation logic for the property editors (.properties
+ .yml
).
Metadata
Metadata
Assignees
Labels
for: eclipsesomething that is specific for Eclipsesomething that is specific for Eclipsefor: vscodesomething that is specific for VSCodesomething that is specific for VSCodetheme: property-editing-supporttype: bug