refactor(api_models): remove deny_unknown_fields from v2 customers and payment_methods DTOs - #14287
Open
ShankarSinghC wants to merge 2 commits into
Open
ShankarSinghC wants to merge 2 commits into
ShankarSinghC wants to merge 2 commits into
Conversation
…d payment_methods DTOs Aligns v2 customers, payment_methods, and payment_method_sessions request DTOs by removing the deny_unknown_fields restriction from customer create/update and payment-method create/intent-create/intent-confirm/update requests (and their nested payment_method_data enums), matching the already-permissive behavior of payment_method_sessions DTOs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Changed Files
|
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.
Summary
#[serde(deny_unknown_fields)]from the v2 (feature = "v2") request DTOs used by/v2/customersand/v2/payment-methods:CustomerRequest,CustomerUpdateRequest,PaymentMethodRetrieveRequest,PaymentMethodCreate,PaymentMethodIntentCreate,PaymentMethodIntentConfirm,PaymentMethodUpdate, and the nestedPaymentMethodCreateData/PaymentMethodUpdateDataenums./v2/payment-method-sessions, whose request DTOs never haddeny_unknown_fieldsin the first place, so unknown fields are now handled consistently (ignored) across all three modular payment-method route groups.Test plan
cargo check --no-default-features --features "release,v2,redis-rs"(same command as CI'scheck-v2job) passes./v2/customersand/v2/payment-methodscreate/update endpoints now accept a request body with an extra unrecognized field instead of returning a 400.🤖 Generated with Claude Code