chore: Update external account schemas from webdev#153
chore: Update external account schemas from webdev#153lightspark-copybara[bot] wants to merge 1 commit intomainfrom
Conversation
Greptile OverviewGreptile SummaryThis PR syncs external account OpenAPI schemas from webdev by:
The change fits into the existing external account type system where Blocking issue: Confidence Score: 2/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Added MXN_SPEI_ACCOUNT and INR_UPI_ACCOUNT to oneOf/discriminator, but the oneOf list items are malformed (missing - under oneOf:) which breaks the schema. |
| openapi/components/schemas/external_accounts/InrUpiAccountInfo.yaml | Introduced INR UPI external account schema with required accountType/beneficiary/vpa and const paymentRail/receivingCurrency. |
| openapi/components/schemas/external_accounts/MxnSpeiAccountInfo.yaml | Introduced MXN SPEI external account schema with required accountType/beneficiary/clabeNumber and validation on clabeNumber. |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant Spec as OpenAPI Schemas
Client->>API: Create External Account (accountType=MXN_SPEI_ACCOUNT / INR_UPI_ACCOUNT)
API->>Spec: Resolve ExternalAccountInfoOneOf discriminator
alt oneOf list malformed
Spec-->>API: Schema resolution fails (oneOf is null / invalid)
API-->>Client: Request/response validation breaks in tooling
else oneOf well-formed
Spec-->>API: Select matching schema via mapping
API-->>Client: Validate required fields (clabeNumber/vpa, beneficiary.fullName)
end
| 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: US Account | ||
| $ref: ./UsAccountExternalAccountInfo.yaml |
There was a problem hiding this comment.
Malformed oneOf list
oneOf: must contain a YAML sequence of schemas (each item should be indented under oneOf:), but the current file has oneOf: followed immediately by - title: ... at the same indentation as oneOf:. This makes the oneOf value null and turns the schema entries into top-level keys, which will break bundling/linting and any tooling expecting a valid oneOf.
| 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: US Account | |
| $ref: ./UsAccountExternalAccountInfo.yaml | |
| oneOf: | |
| - title: US Account | |
| $ref: ./UsAccountExternalAccountInfo.yaml |
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:
**Malformed `oneOf` list**
`oneOf:` must contain a YAML sequence of schemas (each item should be indented under `oneOf:`), but the current file has `oneOf:` followed immediately by `- title: ...` at the same indentation as `oneOf:`. This makes the `oneOf` value `null` and turns the schema entries into top-level keys, which will break bundling/linting and any tooling expecting a valid `oneOf`.
```suggestion
oneOf:
- title: US Account
$ref: ./UsAccountExternalAccountInfo.yaml
```
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.