Skip to content

[dataprotection] Code generation: update services and models#1700

Merged
gcatanese merged 1 commit into
mainfrom
sdk-automation/dataprotection
May 21, 2026
Merged

[dataprotection] Code generation: update services and models#1700
gcatanese merged 1 commit into
mainfrom
sdk-automation/dataprotection

Conversation

@AdyenAutomationBot
Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the dataprotection service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@AdyenAutomationBot AdyenAutomationBot requested a review from a team as a code owner May 21, 2026 12:55
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the SubjectErasureResponse model to improve enum value handling and updates the SDK generation metadata. Feedback suggests adding a null check for the raw result value during JSON deserialization to avoid nullability warnings and maintain consistency with other conversion methods.

case "result":
string? resultRawValue = utf8JsonReader.GetString();
result = new Option<SubjectErasureResponse.ResultEnum?>(SubjectErasureResponse.ResultEnum.FromStringOrDefault(resultRawValue));
result = new Option<SubjectErasureResponse.ResultEnum?>(SubjectErasureResponse.ResultEnum.FromStringOrDefault(resultRawValue) ?? (SubjectErasureResponse.ResultEnum)resultRawValue);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The resultRawValue variable is of type string?, but FromStringOrDefault expects a non-nullable string. Passing a null value here will trigger a nullability warning. Additionally, for consistency with the implementation in ResultEnumJsonConverter.Read (line 175), it's better to check for null before calling the conversion methods.

                            result = new Option<SubjectErasureResponse.ResultEnum?>(resultRawValue == null ? null : SubjectErasureResponse.ResultEnum.FromStringOrDefault(resultRawValue) ?? (SubjectErasureResponse.ResultEnum)resultRawValue);

@gcatanese gcatanese added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 2cdd3fd May 21, 2026
2 checks passed
@gcatanese gcatanese deleted the sdk-automation/dataprotection branch May 21, 2026 13:06
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.

2 participants