Skip to content

chore: Sync account schemas#272

Open
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-grid-schemas-20260316-212808
Open

chore: Sync account schemas#272
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-grid-schemas-20260316-212808

Conversation

@lightspark-copybara
Copy link
Contributor

Auto-synced account schemas.

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

Synced schemas:

  • common/ — per-currency account info, beneficiary, and payment account schemas
  • common/PaymentInstructions.yaml — payment instructions oneOf (new currencies added)
  • external_accounts/ — per-currency external account schemas (reference common/)

Please review the changes before merging.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR auto-syncs account schemas generated from VASP adapter field definitions in sparkcore, adding support for 9 new currencies (AED, KES, MWK, RWF, TZS, UGX, XOF, ZAR, ZMW) across both common/ and external_accounts/ schemas, while also enriching existing schemas with validation constraints (patterns, min/max lengths, enums).

Key changes:

  • New AedAccountInfo.yaml, AedBeneficiary.yaml, and AedExternalAccountInfo.yaml schemas for UAE Dirham support
  • Nine new Payment*AccountInfo.yaml files and corresponding discriminator entries in PaymentInstructions.yaml
  • Validation hardening across many existing schemas (IBAN patterns, SWIFT patterns, account number length constraints)
  • Breaking rename: swiftBicswiftCode in DkkAccountInfo.yaml and EurAccountInfo.yaml (noted in prior thread)
  • Breaking pattern change: GBP sort code no longer accepts hyphenated format (XX-XX-XX)
  • Potentially breaking: BrlAccountInfo.pixKeyType now restricted to a lowercase-only enum
  • AedAccountInfo.yaml and its Payment/External counterparts use German IBAN/SWIFT examples (DE89..., DEUTDEFF) which are misleading for a UAE Dirham account schema

Confidence Score: 2/5

  • This PR contains multiple breaking changes to existing schemas that could affect API consumers without a deprecation period.
  • Several concerns lower confidence: (1) the GBP sort code pattern silently drops hyphenated format support, breaking existing consumers using XX-XX-XX; (2) the BRL pixKeyType field transitions from an unconstrained string to a lowercase-only enum, potentially rejecting previously valid values; (3) the swiftBicswiftCode rename in DKK/EUR (flagged in a prior thread) is a breaking field rename; (4) the LIGHTNING_ACCOUNT duplicate discriminator entry remains unresolved; (5) the AED schema ships with copy-pasted German IBAN/SWIFT examples that could mislead integrators. The new currency additions themselves are well-structured, but the breaking modifications to existing schemas need careful review before merging.
  • openapi/components/schemas/common/GbpAccountInfo.yaml, openapi/components/schemas/common/BrlAccountInfo.yaml, openapi/components/schemas/common/AedAccountInfo.yaml, and openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml need the most attention.

Important Files Changed

Filename Overview
openapi/components/schemas/common/AedAccountInfo.yaml New AED account info schema with correct structure, but IBAN and SWIFT examples reference German bank identifiers instead of UAE-specific ones.
openapi/components/schemas/common/AedBeneficiary.yaml New individual beneficiary schema for AED accounts; structure is consistent with other currency beneficiary schemas.
openapi/components/schemas/common/PaymentInstructions.yaml Adds nine new payment currency discriminator entries (AED, KES, MWK, RWF, TZS, UGX, XOF, ZAR, ZMW); previously flagged issue with missing PaymentAccountType.yaml enum values remains open.
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml Adds AED external account to oneOf and discriminator mapping, but retains the erroneous LIGHTNING_ACCOUNT duplicate mapping (already flagged in a prior review thread).
openapi/components/schemas/common/GbpAccountInfo.yaml Sort code pattern changed from accepting hyphenated format (XX-XX-XX) to digits-only (XXXXXX), which is a breaking change for consumers supplying sort codes with hyphens.
openapi/components/schemas/common/BrlAccountInfo.yaml Adds validation constraints and a new lowercase-only pixKeyType enum; narrowing an unconstrained string field could break existing consumers using uppercase values.
openapi/components/schemas/common/DkkAccountInfo.yaml Field renamed from swiftBic to swiftCode (breaking change, flagged in prior review thread); also adds IBAN/SWIFT validation patterns and examples.
openapi/components/schemas/common/EurAccountInfo.yaml Same swiftBic→swiftCode rename as DkkAccountInfo.yaml; adds IBAN/SWIFT validation patterns consistent with other EUR-zone schemas.
openapi/components/schemas/external_accounts/AedExternalAccountInfo.yaml New AED external account schema correctly composing BaseExternalAccountInfo, AedAccountInfo, and AedBeneficiary with a proper discriminator.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PaymentInstructions / ExternalAccountInfoOneOf] -->|oneOf discriminator| B[Existing Currencies]
    A -->|NEW: oneOf discriminator| C[New Currencies Added]

    C --> AED[AED_ACCOUNT\nAedAccountInfo/AedExternalAccountInfo]
    C --> KES[KES_ACCOUNT\nKesAccountInfo]
    C --> MWK[MWK_ACCOUNT\nMwkAccountInfo]
    C --> RWF[RWF_ACCOUNT\nRwfAccountInfo]
    C --> TZS[TZS_ACCOUNT\nTzsAccountInfo]
    C --> UGX[UGX_ACCOUNT\nUgxAccountInfo]
    C --> XOF[XOF_ACCOUNT\nXofAccountInfo]
    C --> ZAR[ZAR_ACCOUNT\nZarAccountInfo]
    C --> ZMW[ZMW_ACCOUNT\nZmwAccountInfo]

    AED --> AEDBen[AedBeneficiary\nINDIVIDUAL / BUSINESS]

    style C fill:#d4f5d4,stroke:#4caf50
    style AED fill:#d4f5d4,stroke:#4caf50
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/AedAccountInfo.yaml
Line: 19-23

Comment:
**Incorrect IBAN/SWIFT examples for AED account**

The `iban` example `DE89370400440532013000` is a German IBAN (prefix `DE`), not a UAE IBAN. UAE IBANs use the `AE` prefix and are 23 characters long (e.g., `AE070331234567890123456`). The same copy-paste issue affects the `swiftCode` example — `DEUTDEFF` is Deutsche Bank's BIC, not a UAE bank. These mismatched examples are in the schema for an **AED** (UAE Dirham) account and could mislead API consumers about the expected format.

```suggestion
    description: The IBAN of the bank account
    example: AE070331234567890123456
    minLength: 15
    maxLength: 34
    pattern: ^[A-Z]{2}[0-9]{2}[A-Za-z0-9]{11,30}$
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/AedAccountInfo.yaml
Line: 26-30

Comment:
**SWIFT example mismatch for AED account**

`DEUTDEFF` is Deutsche Bank's BIC (a German bank). For an AED (UAE Dirham) account, the example should reference a UAE-based bank, such as `EBILAEAD` (Emirates NBD) or similar.

```suggestion
    description: The SWIFT/BIC code of the bank
    example: EBILAEAD
    minLength: 8
    maxLength: 11
    pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/GbpAccountInfo.yaml
Line: 18-24

Comment:
**Breaking change: sort code hyphen format removed**

The previous pattern `'^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$'` accepted both hyphenated (`20-00-00`) and non-hyphenated (`200000`) sort codes. The new pattern `^[0-9]{6}$` only accepts the 6-digit format without hyphens.

Any existing API consumers who currently provide sort codes in the traditional `XX-XX-XX` format (which UK banks widely display) will now receive validation errors. If this normalization is intentional, it should be called out explicitly in the description, and consumers should be notified of the format change.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/BrlAccountInfo.yaml
Line: 26-32

Comment:
**Potentially breaking: `pixKeyType` enum uses lowercase values**

A new `enum` constraint has been added to `pixKeyType` using lowercase values (`email`, `phone`, `cpf`, `cnpj`, `random`). If any existing API consumers are passing uppercase or mixed-case values (e.g., `EMAIL`, `CPF`, `PHONE`), they will now fail schema validation. This is a narrowing change on a previously unconstrained string field.

If uppercase or mixed-case variants were previously accepted by the backend, they should be included in the enum, or the description should make the casing requirement explicit.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: 23509bc

Copy link
Contributor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@JasonCWang JasonCWang force-pushed the auto/sync-grid-schemas-20260316-212808 branch from 10dec09 to 23509bc Compare March 16, 2026 21:54
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(api): add AED account type, rename swiftBic to swiftCode, fix BRL pixKeyType type

openapi

feat(api): add AED/KES/MWK/RWF/TZS/UGX/XOF/ZAR/ZMW accounts, update validations, rename fields

python

feat(api): add AED/KES/MWK/RWF/TZS/UGX/XOF/ZAR/ZMW account types, fix BRL/DKK/EUR fields

typescript

feat(api): add AED/KES/MWK/RWF/TZS/UGX/XOF/ZAR/ZMW account types, fix field names

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-openapi studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅

New diagnostics (10 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

pip install https://pkg.stainless.com/s/grid-python/44fb5d73d2ff5f49ae43bf2900d71c85233bde2a/grid-0.0.1-py3-none-any.whl
New diagnostics (10 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
grid-kotlin studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

New diagnostics (15 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/13be8e11e9142ff666a98bc2453e2169660e18d8/dist.tar.gz
New diagnostics (10 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-03-16 22:03:00 UTC

Comment on lines 18 to +24
sortCode:
type: string
description: UK bank sort code (6 digits, may include hyphens)
example: '20-00-00'
pattern: '^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$'
description: The UK sort code
example: '123456'
minLength: 6
maxLength: 6
pattern: ^[0-9]{6}$
Copy link
Contributor

Choose a reason for hiding this comment

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

Breaking change: sort code hyphen format removed

The previous pattern '^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$' accepted both hyphenated (20-00-00) and non-hyphenated (200000) sort codes. The new pattern ^[0-9]{6}$ only accepts the 6-digit format without hyphens.

Any existing API consumers who currently provide sort codes in the traditional XX-XX-XX format (which UK banks widely display) will now receive validation errors. If this normalization is intentional, it should be called out explicitly in the description, and consumers should be notified of the format change.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/GbpAccountInfo.yaml
Line: 18-24

Comment:
**Breaking change: sort code hyphen format removed**

The previous pattern `'^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$'` accepted both hyphenated (`20-00-00`) and non-hyphenated (`200000`) sort codes. The new pattern `^[0-9]{6}$` only accepts the 6-digit format without hyphens.

Any existing API consumers who currently provide sort codes in the traditional `XX-XX-XX` format (which UK banks widely display) will now receive validation errors. If this normalization is intentional, it should be called out explicitly in the description, and consumers should be notified of the format change.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +26 to +32
description: The type of PIX key
enum:
- email
- phone
- cpf
- cnpj
- random
Copy link
Contributor

Choose a reason for hiding this comment

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

Potentially breaking: pixKeyType enum uses lowercase values

A new enum constraint has been added to pixKeyType using lowercase values (email, phone, cpf, cnpj, random). If any existing API consumers are passing uppercase or mixed-case values (e.g., EMAIL, CPF, PHONE), they will now fail schema validation. This is a narrowing change on a previously unconstrained string field.

If uppercase or mixed-case variants were previously accepted by the backend, they should be included in the enum, or the description should make the casing requirement explicit.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/BrlAccountInfo.yaml
Line: 26-32

Comment:
**Potentially breaking: `pixKeyType` enum uses lowercase values**

A new `enum` constraint has been added to `pixKeyType` using lowercase values (`email`, `phone`, `cpf`, `cnpj`, `random`). If any existing API consumers are passing uppercase or mixed-case values (e.g., `EMAIL`, `CPF`, `PHONE`), they will now fail schema validation. This is a narrowing change on a previously unconstrained string field.

If uppercase or mixed-case variants were previously accepted by the backend, they should be included in the enum, or the description should make the casing requirement explicit.

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.

1 participant