-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Update external account schemas from webdev #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: Update external account schemas from webdev #172
Conversation
Greptile OverviewGreptile SummaryThis PR auto-syncs new external account OpenAPI schemas for additional fiat corridors (e.g., BRL/THB/USD/etc.) and updates Main concern is that Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/BrlAccountInfo.yaml | Adds new BRL Account schema with Pix rail, BRL const receivingCurrency, and beneficiary object. |
| openapi/components/schemas/external_accounts/DkkAccountInfo.yaml | Adds new DKK Account schema with Sepa rail, DKK const receivingCurrency, and IBAN/SWIFT fields. |
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Updates oneOf list and discriminator mapping; introduces duplicate titles and mixes new *AccountInfo.yaml variants alongside existing *ExternalAccountInfo.yaml refs. |
| openapi/components/schemas/external_accounts/GbpAccountInfo.yaml | Adds new GBP Account schema with Local rail, GBP const receivingCurrency, and sortCode/accountNumber. |
| openapi/components/schemas/external_accounts/HkdAccountInfo.yaml | Adds new HKD Account schema with Local rail, HKD const receivingCurrency, and bankName/accountNumber. |
| openapi/components/schemas/external_accounts/IdrAccountInfo.yaml | Adds new IDR Account schema with Local rail and beneficiary object. |
| openapi/components/schemas/external_accounts/InrAccountInfo.yaml | Adds new INR Account schema with Upi rail and vpa field plus beneficiary. |
| openapi/components/schemas/external_accounts/MxnAccountInfo.yaml | Adds new MXN Account schema with Local rail and CLABE field plus beneficiary. |
| openapi/components/schemas/external_accounts/MyrAccountInfo.yaml | Adds new MYR Account schema with Local rail and bankName/accountNumber plus beneficiary. |
| openapi/components/schemas/external_accounts/PhpAccountInfo.yaml | Adds new PHP Account schema with Local rail and bankName/accountNumber plus beneficiary. |
| openapi/components/schemas/external_accounts/SgdAccountInfo.yaml | Adds new SGD Account schema with Local rail and bankName/accountNumber plus beneficiary. |
| openapi/components/schemas/external_accounts/ThbAccountInfo.yaml | Adds new THB Account schema with Local rail and bankName/accountNumber plus beneficiary. |
| openapi/components/schemas/external_accounts/UsdAccountInfo.yaml | Adds new USD Account schema with RTP/ACH rails and account/routing numbers; beneficiary now requires birthDate/fullName/nationality. |
| openapi/components/schemas/external_accounts/VndAccountInfo.yaml | Adds new VND Account schema with Local rail and bankName/accountNumber plus beneficiary. |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant OAS as OpenAPI Schema
Client->>API: POST /... (ExternalAccountInfo payload)
API->>OAS: Validate ExternalAccountInfo
OAS->>OAS: oneOf + discriminator(accountType)
alt accountType = GBP_ACCOUNT/PHP_ACCOUNT/SGD_ACCOUNT
OAS-->>OAS: mapping resolves to *AccountExternalAccountInfo.yaml
Note over OAS: oneOf also contains *AccountInfo.yaml for same types
else accountType = new corridors (e.g. BRL_ACCOUNT)
OAS-->>OAS: mapping resolves to *AccountInfo.yaml
end
OAS-->>API: Validation result / chosen schema
API-->>Client: 2xx or 4xx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
14 files reviewed, 2 comments
| - title: GBP Account | ||
| $ref: ./GbpAccountExternalAccountInfo.yaml | ||
| - title: PHP Account | ||
| $ref: ./PhpAccountExternalAccountInfo.yaml | ||
| - title: SGD Account | ||
| $ref: ./SgdAccountExternalAccountInfo.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate oneOf variants
ExternalAccountInfoOneOf.yaml now includes both the legacy Gbp/Php/SgdAccountExternalAccountInfo.yaml refs (lines 16-21) and the new Gbp/Php/SgdAccountInfo.yaml refs (lines 40-45, 56-57) for the same account types. This makes the oneOf ambiguous and can break schema validation/codegen for ExternalAccountInfo; one of the two sets should be removed or reconciled.
Also appears at: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml:40-45,56-57.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 16:21
Comment:
**Duplicate oneOf variants**
`ExternalAccountInfoOneOf.yaml` now includes *both* the legacy `Gbp/Php/SgdAccountExternalAccountInfo.yaml` refs (lines 16-21) and the new `Gbp/Php/SgdAccountInfo.yaml` refs (lines 40-45, 56-57) for the same account types. This makes the `oneOf` ambiguous and can break schema validation/codegen for `ExternalAccountInfo`; one of the two sets should be removed or reconciled.
Also appears at: `openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml:40-45,56-57`.
How can I resolve this? If you propose a fix, please make it concise.
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 60:72
Comment:
**Discriminator points to old schemas**
The discriminator mapping for `GBP_ACCOUNT`/`PHP_ACCOUNT`/`SGD_ACCOUNT` still resolves to the legacy `*AccountExternalAccountInfo.yaml` schemas (lines 70-72), but `oneOf` now also includes the new `*AccountInfo.yaml` variants for those same `accountType` enums. With a discriminator present, clients will pick the mapped (old) schema, leaving the new schemas inconsistent/unused. Consider updating the mapping (or removing the new oneOf entries) so each `accountType` resolves to exactly one schema.
How can I resolve this? If you propose a fix, please make it concise. |
Auto-synced external account schemas from webdev.
These schemas are generated from VASP adapter field definitions in sparkcore.
Please review the changes before merging.