chore: Update external account schemas from webdev#163
chore: Update external account schemas from webdev#163lightspark-copybara[bot] wants to merge 2 commits intomainfrom
Conversation
Greptile OverviewGreptile SummaryThis PR syncs external account OpenAPI schemas from webdev, introducing several new corridor-specific Main integration concern: Confidence Score: 2/5
|
| Filename | Overview |
|---|---|
| mintlify/openapi.yaml | Updates external account discriminator mappings for GBP/PHP/SGD to point at new *AccountInfo schemas and expands those schemas with corridor/beneficiary fields. |
| openapi.yaml | Same schema updates as mintlify/openapi.yaml: external account mappings now reference new *AccountInfo schemas and inline schema definitions were expanded/changed accordingly. |
| openapi/components/schemas/common/GbpAccountInfo.yaml | Deleted legacy common GBP account info schema (sortCode/accountNumber patterns). |
| openapi/components/schemas/common/PhpAccountInfo.yaml | Deleted legacy common PHP account info schema. |
| openapi/components/schemas/common/SgdAccountInfo.yaml | Deleted legacy common SGD account info schema (including swiftCode constraints). |
| openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml | Updated discriminator mapping for GBP/PHP/SGD to point to new *AccountInfo schemas; now inconsistent with ExternalAccountInfoOneOf which dropped some mapped types. |
| openapi/components/schemas/external_accounts/BrlAccountInfo.yaml | Added new BRL account info schema including Pix key, beneficiary, and const payment/currency fields. |
| openapi/components/schemas/external_accounts/DkkAccountInfo.yaml | Added new DKK account info schema with local rails, bank/account fields, and beneficiary object. |
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Replaced oneOf list with only wallets + new corridor account infos; dropped previously supported account types while discriminator mappings elsewhere still reference them (breaks validation for those types). |
| openapi/components/schemas/external_accounts/GbpAccountExternalAccountInfo.yaml | Deleted wrapper schema that composed BaseExternalAccountInfo + common GbpAccountInfo + beneficiary. |
| openapi/components/schemas/external_accounts/GbpAccountInfo.yaml | Added new standalone GBP account info schema including beneficiary object plus const receivingCurrency/payment_rails. |
| openapi/components/schemas/external_accounts/HkdAccountInfo.yaml | Added new HKD account info schema with local rails and beneficiary fields. |
| openapi/components/schemas/external_accounts/IdrAccountInfo.yaml | Added new IDR account info schema with sortCode/accountNumber and beneficiary. |
| openapi/components/schemas/external_accounts/InrAccountInfo.yaml | Added new INR account info schema with sortCode/accountNumber and beneficiary. |
| openapi/components/schemas/external_accounts/MxnAccountInfo.yaml | Added new MXN account info schema with clabeNumber, beneficiary, and const payment/currency fields. |
| openapi/components/schemas/external_accounts/MyrAccountInfo.yaml | Added new MYR account info schema with local rails and beneficiary. |
| openapi/components/schemas/external_accounts/PhpAccountExternalAccountInfo.yaml | Deleted wrapper schema that composed BaseExternalAccountInfo + common PhpAccountInfo + beneficiary. |
| openapi/components/schemas/external_accounts/PhpAccountInfo.yaml | Added new standalone PHP account info schema including beneficiary object plus const receivingCurrency/payment_rails. |
| openapi/components/schemas/external_accounts/SgdAccountExternalAccountInfo.yaml | Deleted wrapper schema that composed BaseExternalAccountInfo + common SgdAccountInfo + beneficiary. |
| openapi/components/schemas/external_accounts/SgdAccountInfo.yaml | Added new standalone SGD account info schema including beneficiary object plus const receivingCurrency/payment_rails. |
| openapi/components/schemas/external_accounts/ThbAccountInfo.yaml | Added new THB account info schema with bankName/accountNumber and beneficiary. |
| openapi/components/schemas/external_accounts/VndAccountInfo.yaml | Added new VND account info schema with sortCode/accountNumber and beneficiary. |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant Schema as OpenAPI Schemas
Client->>API: POST /external_accounts {accountInfo}
API->>Schema: Validate ExternalAccountCreateRequest.accountInfo
Schema->>Schema: Resolve $ref ExternalAccountInfoOneOf
Schema->>Schema: Select branch by discriminator accountType
alt accountType in oneOf list (e.g., GBP_ACCOUNT)
Schema-->>API: Validation passes
API-->>Client: 201 Created
else accountType only in mapping (e.g., NGN_ACCOUNT/CAD_ACCOUNT)
Schema-->>API: Validation fails (no matching oneOf branch)
API-->>Client: 400 Bad Request (schema validation error)
end
| - title: SGD Account | ||
| $ref: ./SgdAccountInfo.yaml | ||
| - title: PHP Account | ||
| $ref: ./PhpAccountInfo.yaml | ||
| - title: MYR Account | ||
| $ref: ./MyrAccountInfo.yaml | ||
| - title: INR Account | ||
| $ref: ./InrAccountInfo.yaml | ||
| - title: DKK Account | ||
| $ref: ./DkkAccountInfo.yaml | ||
| - title: VND Account | ||
| $ref: ./VndAccountInfo.yaml | ||
| - title: MXN Account | ||
| $ref: ./MxnAccountInfo.yaml | ||
| - title: GBP Account | ||
| $ref: ./GbpAccountInfo.yaml |
There was a problem hiding this comment.
Duplicate entries detected - SGD Account (lines 20, 40), PHP Account (lines 18, 42), and GBP Account (lines 16, 54) appear twice in the oneOf list. The new entries reference *AccountInfo.yaml files while existing entries reference *AccountExternalAccountInfo.yaml files. This will cause schema validation errors.
Check if the old entries (lines 16-20) should be removed, or if the new schemas need different account type discriminators.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 40:55
Comment:
Duplicate entries detected - `SGD Account` (lines 20, 40), `PHP Account` (lines 18, 42), and `GBP Account` (lines 16, 54) appear twice in the oneOf list. The new entries reference `*AccountInfo.yaml` files while existing entries reference `*AccountExternalAccountInfo.yaml` files. This will cause schema validation errors.
Check if the old entries (lines 16-20) should be removed, or if the new schemas need different account type discriminators.
How can I resolve this? If you propose a fix, please make it concise.
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-typescript studio · code · diff
✅ grid-kotlin studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
| oneOf: | ||
| - title: US Account | ||
| $ref: ./UsAccountExternalAccountInfo.yaml | ||
| - title: CLABE Account | ||
| $ref: ./ClabeAccountExternalAccountInfo.yaml | ||
| - title: PIX Account | ||
| $ref: ./PixAccountExternalAccountInfo.yaml | ||
| - title: IBAN Account | ||
| $ref: ./IbanAccountExternalAccountInfo.yaml | ||
| - title: UPI Account | ||
| $ref: ./UpiAccountExternalAccountInfo.yaml | ||
| - title: NGN Account | ||
| $ref: ./NgnAccountExternalAccountInfo.yaml | ||
| - title: CAD Account | ||
| $ref: ./CadAccountExternalAccountInfo.yaml | ||
| - title: GBP Account | ||
| $ref: ./GbpAccountExternalAccountInfo.yaml | ||
| - title: PHP Account | ||
| $ref: ./PhpAccountExternalAccountInfo.yaml | ||
| - title: SGD Account | ||
| $ref: ./SgdAccountExternalAccountInfo.yaml | ||
| - title: Spark Wallet | ||
| $ref: ./SparkWalletExternalAccountInfo.yaml | ||
| - title: Lightning | ||
| $ref: ./LightningExternalAccountInfo.yaml | ||
| - title: Solana Wallet | ||
| $ref: ./SolanaWalletExternalAccountInfo.yaml | ||
| - title: Tron Wallet | ||
| $ref: ./TronWalletExternalAccountInfo.yaml | ||
| - title: Polygon Wallet | ||
| $ref: ./PolygonWalletExternalAccountInfo.yaml | ||
| - title: Base Wallet | ||
| $ref: ./BaseWalletExternalAccountInfo.yaml | ||
| - title: Spark Wallet | ||
| $ref: ./SparkWalletExternalAccountInfo.yaml |
There was a problem hiding this comment.
Missing oneOf variants
ExternalAccountInfoOneOf.yaml no longer includes US_ACCOUNT, CLABE, PIX, IBAN, UPI, NGN_ACCOUNT, or CAD_ACCOUNT in the oneOf list, but the discriminator mapping still references several of these (and BaseExternalAccountInfo.yaml still maps NGN_ACCOUNT/CAD_ACCOUNT). Any schema using accountInfo: $ref: ./ExternalAccountInfoOneOf.yaml (e.g., ExternalAccount.yaml, ExternalAccountCreateRequest.yaml) will reject those account types because they’re not valid oneOf branches. Add the missing $ref entries back into oneOf (or remove the discriminator mappings and any API support for those types in the same PR).
Also appears in: openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml mapping still includes NGN_ACCOUNT/CAD_ACCOUNT.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 1:3
Comment:
**Missing oneOf variants**
`ExternalAccountInfoOneOf.yaml` no longer includes `US_ACCOUNT`, `CLABE`, `PIX`, `IBAN`, `UPI`, `NGN_ACCOUNT`, or `CAD_ACCOUNT` in the `oneOf` list, but the discriminator mapping still references several of these (and `BaseExternalAccountInfo.yaml` still maps `NGN_ACCOUNT`/`CAD_ACCOUNT`). Any schema using `accountInfo: $ref: ./ExternalAccountInfoOneOf.yaml` (e.g., `ExternalAccount.yaml`, `ExternalAccountCreateRequest.yaml`) will reject those account types because they’re not valid `oneOf` branches. Add the missing `$ref` entries back into `oneOf` (or remove the discriminator mappings and any API support for those types in the same PR).
Also appears in: `openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml` mapping still includes `NGN_ACCOUNT`/`CAD_ACCOUNT`.
How can I resolve this? If you propose a fix, please make it concise.| UPI: ./UpiAccountExternalAccountInfo.yaml | ||
| NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml | ||
| CAD_ACCOUNT: ./CadAccountExternalAccountInfo.yaml | ||
| GBP_ACCOUNT: ./GbpAccountExternalAccountInfo.yaml | ||
| PHP_ACCOUNT: ./PhpAccountExternalAccountInfo.yaml | ||
| SGD_ACCOUNT: ./SgdAccountExternalAccountInfo.yaml | ||
| GBP_ACCOUNT: ./GbpAccountInfo.yaml |
There was a problem hiding this comment.
Discriminator / oneOf mismatch
BaseExternalAccountInfo.yaml still maps NGN_ACCOUNT and CAD_ACCOUNT, but ExternalAccountInfoOneOf.yaml’s oneOf no longer includes those schemas. With accountInfo validated against ExternalAccountInfoOneOf, payloads using accountType: NGN_ACCOUNT or CAD_ACCOUNT will fail validation because there’s no corresponding oneOf branch. Either re-add those variants to ExternalAccountInfoOneOf.oneOf (and mapping) or remove/disable the types consistently across both schemas (and any endpoints that claim to support them).
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/BaseExternalAccountInfo.yaml
Line: 14:17
Comment:
**Discriminator / oneOf mismatch**
`BaseExternalAccountInfo.yaml` still maps `NGN_ACCOUNT` and `CAD_ACCOUNT`, but `ExternalAccountInfoOneOf.yaml`’s `oneOf` no longer includes those schemas. With `accountInfo` validated against `ExternalAccountInfoOneOf`, payloads using `accountType: NGN_ACCOUNT` or `CAD_ACCOUNT` will fail validation because there’s no corresponding `oneOf` branch. Either re-add those variants to `ExternalAccountInfoOneOf.oneOf` (and mapping) or remove/disable the types consistently across both schemas (and any endpoints that claim to support them).
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.