Skip to content

[reportwebhooks] Code generation: update services and models#1702

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

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

Conversation

@AdyenAutomationBot

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the reportwebhooks 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

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

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.

Code Review

This pull request updates the ReportNotificationRequest model to refine the deserialization and conversion logic for the TypeEnum field, alongside updating SDK generation metadata. A review comment suggests simplifying the manual deserialization of the type property by using JsonSerializer.Deserialize directly, which would also resolve a potential nullability compiler warning.

Comment on lines 266 to +267
string? typeRawValue = utf8JsonReader.GetString();
type = new Option<ReportNotificationRequest.TypeEnum?>(ReportNotificationRequest.TypeEnum.FromStringOrDefault(typeRawValue));
type = new Option<ReportNotificationRequest.TypeEnum?>(ReportNotificationRequest.TypeEnum.FromStringOrDefault(typeRawValue) ?? (ReportNotificationRequest.TypeEnum)typeRawValue);

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 typeRawValue variable is of type string?, but it is passed to FromStringOrDefault which expects a non-nullable string. This triggers a compiler warning (CS8604) in a #nullable enable context. Additionally, this manual deserialization logic is redundant because it is already implemented in the TypeEnumJsonConverter. You can simplify this by leveraging JsonSerializer.Deserialize directly, which is more maintainable and avoids the nullability issue.

                            type = new Option<ReportNotificationRequest.TypeEnum?>(JsonSerializer.Deserialize<ReportNotificationRequest.TypeEnum>(ref utf8JsonReader, jsonSerializerOptions));

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