Skip to content

chore: Update external account schemas from webdev#153

Open
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-external-accounts-20260204-221002
Open

chore: Update external account schemas from webdev#153
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-external-accounts-20260204-221002

Conversation

@lightspark-copybara
Copy link

Auto-synced external account schemas from webdev.

These schemas are generated from VASP adapter field definitions in sparkcore.

Please review the changes before merging.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 4, 2026

Greptile Overview

Greptile Summary

This PR syncs external account OpenAPI schemas from webdev by:

  • Adding two new external account info schemas (MxnSpeiAccountInfo, InrUpiAccountInfo).
  • Registering the new accountType discriminator mappings in ExternalAccountInfoOneOf.yaml.

The change fits into the existing external account type system where ExternalAccountInfoOneOf uses a discriminator on accountType to select the correct schema for request/response validation.

Blocking issue: ExternalAccountInfoOneOf.yaml’s oneOf list is currently malformed YAML (items are not nested under oneOf:), which will break OpenAPI bundling/linting and schema resolution in tooling until fixed.

Confidence Score: 2/5

  • Not safe to merge until the OpenAPI schema YAML is fixed.
  • The new schema files look consistent, but ExternalAccountInfoOneOf.yaml has a structural YAML error that makes oneOf null and will break OpenAPI bundling/linting and discriminator-based schema selection.
  • openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml

Important Files Changed

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
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 1 to +3
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

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.

0 participants