junytse opened a new issue, #968:
URL: https://github.com/apache/directory-scimple/issues/968
I'm testing my SCIM implementation against PingFederate SCIM provisioner. I
found PingFederate sent PUT /Groups with the below body:
```
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"id": "50C4361F4F1997BA231F7FBD3EF5A05A",
"displayName": "Test Group",
"members": [
{
"value": "6DC742E9409171E1716A7196CBB0FD25",
"type": "value"
},
{
"value": "CDA89FFC45ADB26133F087A57A8C58BB",
"type": "value"
}
]
}
```
Notice that `"type": "value"` is not RFC-compliant. The current code will
throw an error by Jackson deserializer:
> Cannot deserialize value of type
`org.apache.directory.scim.spec.resources.GroupMembership$Type` from String
"value": not one of the values accepted for Enum class: [User, Group]
However, since `type` is an optional property for group members, a more
robust way to handle this is to treat is as an unkown value (deserialize to
`null`).
My workaround is to enable a Jackson flag to return null if the enum not
match:
```
myMapper = ObjectMapperFactory.createObjectMapper(schemaRegistry);
myMapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL,
true);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]