Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ListResponse's Resources attribute should be conditionally required #233

Closed
tsvetelin-petrov opened this issue Oct 2, 2024 · 3 comments · Fixed by #235
Closed

The ListResponse's Resources attribute should be conditionally required #233

tsvetelin-petrov opened this issue Oct 2, 2024 · 3 comments · Fixed by #235
Assignees

Comments

@tsvetelin-petrov
Copy link

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

  • Java version: 17
  • SCIM 2 SDK version: 2.3.7
@kqarryzada
Copy link
Collaborator

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.

@kqarryzada
Copy link
Collaborator

We've just committed a change to fix this behavior, and it should be available in the next release.

@kqarryzada
Copy link
Collaborator

This feature is now available in the 3.2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants