Skip to content

[relayedauthorizationwebhooks] Code generation: update services and models#1708

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

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

Conversation

@AdyenAutomationBot
Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the relayedauthorizationwebhooks 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 updates several models within the RelayedAuthorizationWebhooks namespace to improve the handling of unknown enum values during JSON deserialization by preserving raw values through explicit casting. Review feedback highlights that the new discriminator check in PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs is overly restrictive and breaks forward compatibility, contradicting the patterns used in other models. Additionally, the assignment logic in AuthorisationDecisionResponse.cs needs validation to ensure that null values are not assigned to the non-nullable Status property, which could lead to an invalid object state.

}

if (ibanAccountIdentification?.Type != null)
if (ibanAccountIdentification?.Type != null && IbanAccountIdentification.TypeEnum.FromStringOrDefault((string?)ibanAccountIdentification.Type) != null)
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.

high

This stricter discriminator check breaks forward compatibility. If the API introduces a new account identification type, this method will throw a JsonException instead of potentially allowing the use of the existing model or skipping the unknown item. This contradicts the improvements made in other models (e.g., AmountAdjustment) where unknown enum values are now preserved via the Value property and explicit casting.

            if (ibanAccountIdentification?.Type != null)


var authorisationDecisionResponse = new AuthorisationDecisionResponse();
authorisationDecisionResponse.Status = status.Value!.Value;
authorisationDecisionResponse.Status = status.Value!;
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 assignment status.Value! can result in a null value being assigned to the non-nullable Status property if the JSON contains an explicit null value (e.g., "status": null). While the previous version (status.Value!.Value) would have thrown a NullReferenceException during deserialization, the new code allows the object to be created in an invalid state. Consider validating that status.Value is not null before assignment to ensure the required property is correctly populated.

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