Skip to content

Update bulk patch operation handling.#303

Merged
kqarryzada merged 2 commits into
masterfrom
DS-51673-update-bulk-patch-ops
Jul 7, 2026
Merged

Update bulk patch operation handling.#303
kqarryzada merged 2 commits into
masterfrom
DS-51673-update-bulk-patch-ops

Conversation

@kqarryzada

Copy link
Copy Markdown
Collaborator

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

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 kqarryzada self-assigned this Jul 2, 2026
}

if (schema == null || schema.getId() == null)
Schema schema = clazz.getAnnotation(Schema.class);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list broke the flow of the explanation, and it's effectively re-explained with the example below.

@vyhhuang vyhhuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

@kqarryzada
kqarryzada merged commit 568003e into master Jul 7, 2026
6 checks passed
@kqarryzada
kqarryzada deleted the DS-51673-update-bulk-patch-ops branch July 7, 2026 15:14
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 this pull request may close these issues.

3 participants