keycloak::types::UnmanagedAttributePolicy
has incorrect serialization
#126
Milestone
keycloak::types::UnmanagedAttributePolicy
has incorrect serialization
#126
Area
admin/api
Describe the bug
To access PUT /admin/realms/{realm}/users/profile endpoint of Keycloak Admin Rest API, the required body parameter is
UPConfig
(Described here). Which has a parameterunmanagedAttributePolicy
, and its allowed values areENABLED
,ADMIN_EDIT
,ADMIN_VIEW
. But keycloak::types::UnmanagedAttributePolicy does not have appropriate serialization, it gets serialized toEnabled
,AdminView
,AdminEdit
which results in a 400 status code from the keycloak endpoint.Version
25.0.0
Regression
Expected behavior
https://docs.rs/keycloak/latest/keycloak/types/enum.UnmanagedAttributePolicy.html# should be serialized to
SCREAMING_SNAKE_CASE
Actual behavior
https://docs.rs/keycloak/latest/keycloak/types/enum.UnmanagedAttributePolicy.html# is serialized to
PascalCase
How to Reproduce?
Make request to GET {{keycloak_url}}/admin/realms/{{realm}}/users/profile, which returns the UPConfig object.
Make request to PUT {{keycloak_urll}}/admin/realms/{{realm}}/users/profile, with body as the UPConfig object fetched in the above request, and changing the unmanagedAttributePolicy value to
Enabled
orAdminEdit
orAdminView
The text was updated successfully, but these errors were encountered: