Update bulk patch operation handling.#303
Merged
Merged
Conversation
The errata of RFC 7644 contains details on the intended form of bulk
patch operations. It affirms that the 'data' field reflects the JSON
payload that would be sent to the provided endpoint if the request were
made individually to an endpoint such as 'PATCH /Users/{userID}'. Thus,
it explicitly states that the JSON data provided on a bulk patch should
always represent a PatchRequest resource with a "schemas" value.
This commit updates the SCIM SDK to reflect this behavior. To ensure
compatibility during deserialization, extra leniency has been added
when initializing bulk patch operations to reduce exceptions. After
instantiation, the data field of bulk patch operation objects will
always represent a full PatchRequest model.
Reviewer: dougbulkley
Reviewer: vyhhuang
JiraIssue: DS-51673
kqarryzada
commented
Jul 2, 2026
| } | ||
|
|
||
| if (schema == null || schema.getId() == null) | ||
| Schema schema = clazz.getAnnotation(Schema.class); |
Collaborator
Author
There was a problem hiding this comment.
SchemaUtils was doing a lot of extra work that we don't actually need here. To eliminate exception potential and make this simpler, we now fetch the annotation directly.
| * To construct a bulk operation, use one of the static methods defined on this | ||
| * class. Some examples include: | ||
| * <ul> | ||
| * <li> {@link #post(String, ScimResource)} |
Collaborator
Author
There was a problem hiding this comment.
This list broke the flow of the explanation, and it's effectively re-explained with the example below.
vyhhuang
approved these changes
Jul 2, 2026
vyhhuang
left a comment
Collaborator
There was a problem hiding this comment.
These changes look good to me.
dougbulkley
approved these changes
Jul 7, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The errata of RFC 7644 contains details on the intended form of bulk patch operations. It affirms that the 'data' field reflects the JSON payload that would be sent to the provided endpoint if the request were made individually to an endpoint such as 'PATCH /Users/{userID}'. Thus, it explicitly states that the JSON data provided on a bulk patch should always represent a PatchRequest resource with a "schemas" value.
This commit updates the SCIM SDK to reflect this behavior. To ensure compatibility during deserialization, extra leniency has been added when initializing bulk patch operations to reduce exceptions. After instantiation, the data field of bulk patch operation objects will always represent a full PatchRequest model.
Reviewer: dougbulkley
Reviewer: vyhhuang
JiraIssue: DS-51673