-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow deserializing null Resources in ListResponse
RFC 7644 states that the Resources array in a ListResponse is permitted to be null when the value of totalResults is 0. Previously, the SCIM SDK would throw an exception on any attempt to convert a JSON string to a ListResponse if the Resources array was missing. The SDK has been updated to successfully process JSON strings with a null array, as long as the totalResults or itemsPerPage fields are explicitly set to 0. The latter is not technically requested in the specification. but it seems probable that a service provider could return a null array in this case even though it is not correct. There is arguably little benefit to rejecting the case where itemsPerPage is 0 and the Resources array is null, so we will be permissive of this to prevent further deserialization errors, as they can be difficult for application developers to work around. Note that this commit does not change any behavior for serializing a ListResponse object to a JSON string. By default, the SCIM SDK will always print this case as an explicit empty array. Reviewer: vyhhuang Reviewer: dougbulkley JiraIssue: DS-49416
- Loading branch information
1 parent
67986bf
commit dc8144f
Showing
3 changed files
with
258 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters