You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Deserialize a ListResponse with no resources.
Expected behavior
The Resources attribute is to be required only if the "totalResults" is non-zero, or to be marked as optional and the validation is to be expected from the consumer of the class.
Additional context
Java version: 17
SCIM 2 SDK version: 2.3.7
The text was updated successfully, but these errors were encountered:
Hi @tsvetelin-petrov, I agree that the SCIM SDK should not fail to deserialize responses in this case. I plan to take a look at this in the coming weeks.
Describe the bug
Considering the RFC specification, the Resources field of ListResponse is required only if the "totalResults" is non-zero (https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2). In the current implementation (https://github.com/pingidentity/scim2/blob/master/scim2-sdk-common/src/main/java/com/unboundid/scim2/common/messages/ListResponse.java#L74), the "Resources" attribute is marked as required, and if a response with no resources is received, a deserialization exception is thrown.
To Reproduce
Deserialize a ListResponse with no resources.
Expected behavior
The Resources attribute is to be required only if the "totalResults" is non-zero, or to be marked as optional and the validation is to be expected from the consumer of the class.
Additional context
The text was updated successfully, but these errors were encountered: