chore: Sync account schemas#609
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript ✅ grid-ruby studio · code
|
Greptile SummaryThis PR auto-syncs account schemas from VASP adapter field definitions in sparkcore, updating SGD, CNY, and GBP schemas across the source
Confidence Score: 3/5The SGD and enum ordering changes are safe to merge. The CNY bankName description regression and GBP example removal should be reviewed before shipping. The CNY schema drops 'mobile-wallet provider' from the bankName description while the field remains required for MOBILE_MONEY payments — an integrator following the field description alone would not know what value to supply on that rail. The GBP beneficiary schema loses all field-level examples with no replacement, removing format guidance (ISO country codes, date format) from the rendered docs. The SGD and enum reordering changes are unambiguously correct. openapi/components/schemas/common/CnyAccountInfoBase.yaml (bankName description) and openapi/components/schemas/common/GbpBeneficiary.yaml (missing examples) warrant a second look before merging.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/CnyAccountInfoBase.yaml | Property ordering refactor for bankName/phoneNumber, plus description simplifications that drop rail-specific guidance and the 'mobile-wallet provider' context from bankName — may mislead MOBILE_MONEY integrators |
| openapi/components/schemas/common/SgdAccountInfoBase.yaml | bankName removed from required array; description updated to explain it is auto-resolved from swiftCode — intentional and well-documented change |
| openapi/components/schemas/common/GbpBeneficiary.yaml | All field-level examples removed (fullName, birthDate, nationality, email, phoneNumber, countryOfResidence, beneficiaryType) with no object-level replacement, degrading docs usability |
| openapi/components/schemas/common/CnyAccountInfo.yaml | Enum ordering swapped from [MOBILE_MONEY, BANK_TRANSFER] to [BANK_TRANSFER, MOBILE_MONEY] — cosmetic/alphabetical reorder, no functional impact |
| openapi.yaml | Generated bundle — mirrors all source schema changes; contains same CnyAccountInfoBase description regression and GbpBeneficiary example removal |
| mintlify/openapi.yaml | Generated bundle for Mintlify — identical changes to openapi.yaml; same issues present |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CNY Account Creation] --> B{paymentRails?}
B -->|BANK_TRANSFER| C[Required: accountNumber + bankName]
B -->|MOBILE_MONEY| D[Required: bankName + phoneNumber]
C --> E[bankName = Bank name]
D --> F["bankName = Mobile-wallet provider name\n⚠️ description now says 'bank' only"]
G[SGD Account Creation] --> H[Required: accountType + accountNumber + swiftCode]
H --> I{bankName provided?}
I -->|Yes| J[Use provided bankName]
I -->|No - now optional| K[Resolve from swiftCode via partner directory]
L[GBP Beneficiary] --> M[Required: beneficiaryType + fullName]
M --> N[Optional: birthDate, nationality, email, phoneNumber, countryOfResidence, address]
N --> O["⚠️ Field-level examples removed\n(format hints gone from docs)"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[CNY Account Creation] --> B{paymentRails?}
B -->|BANK_TRANSFER| C[Required: accountNumber + bankName]
B -->|MOBILE_MONEY| D[Required: bankName + phoneNumber]
C --> E[bankName = Bank name]
D --> F["bankName = Mobile-wallet provider name\n⚠️ description now says 'bank' only"]
G[SGD Account Creation] --> H[Required: accountType + accountNumber + swiftCode]
H --> I{bankName provided?}
I -->|Yes| J[Use provided bankName]
I -->|No - now optional| K[Resolve from swiftCode via partner directory]
L[GBP Beneficiary] --> M[Required: beneficiaryType + fullName]
M --> N[Optional: birthDate, nationality, email, phoneNumber, countryOfResidence, address]
N --> O["⚠️ Field-level examples removed\n(format hints gone from docs)"]
Comments Outside Diff (1)
-
openapi/components/schemas/common/GbpBeneficiary.yaml, line 6-30 (link)Field-level examples stripped with no replacement
All property-level examples (
Jane Smith,1990-01-15,GB,jane.smith@example.com,+447700900123) were removed and no top-levelexample:block was added to compensate. The rendered API reference will now show empty value hints for every optional field inGbpBeneficiary, making it harder for integrators to understand expected formats (e.g., the ISO-3166 alpha-2 code fornationalityandcountryOfResidence, theYYYY-MM-DDformat forbirthDate). Consider adding a single object-levelexample:block to preserve discoverability.Prompt To Fix With AI
This is a comment left during a code review. Path: openapi/components/schemas/common/GbpBeneficiary.yaml Line: 6-30 Comment: **Field-level examples stripped with no replacement** All property-level examples (`Jane Smith`, `1990-01-15`, `GB`, `jane.smith@example.com`, `+447700900123`) were removed and no top-level `example:` block was added to compensate. The rendered API reference will now show empty value hints for every optional field in `GbpBeneficiary`, making it harder for integrators to understand expected formats (e.g., the ISO-3166 alpha-2 code for `nationality` and `countryOfResidence`, the `YYYY-MM-DD` format for `birthDate`). Consider adding a single object-level `example:` block to preserve discoverability. How can I resolve this? If you propose a fix, please make it concise.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
openapi/components/schemas/common/CnyAccountInfoBase.yaml:20-24
The `bankName` description was narrowed from "The name of the bank or mobile-wallet provider" to "The name of the bank", but this field is still required for the MOBILE_MONEY rail (as stated in the schema description above). For MOBILE_MONEY payments there is no bank — the value is the mobile-wallet provider name. Dropping that clause leaves MOBILE_MONEY integrators without the guidance they need and could cause incorrect payloads to be submitted.
```suggestion
bankName:
type: string
description: The name of the bank or mobile-wallet provider
minLength: 1
maxLength: 255
```
### Issue 2 of 3
openapi/components/schemas/common/CnyAccountInfoBase.yaml:15-27
The descriptions for `accountNumber` and `phoneNumber` previously called out which payment rail each field applies to ("BANK_TRANSFER rail" / "MOBILE_MONEY rail"). Those rail hints were the only inline guidance telling integrators when to supply each field; removing them leaves users to rely solely on the prose block at the top of the schema.
```suggestion
accountNumber:
type: string
description: The destination bank account number (BANK_TRANSFER rail)
minLength: 1
maxLength: 34
bankName:
type: string
description: The name of the bank or mobile-wallet provider
minLength: 1
maxLength: 255
phoneNumber:
type: string
description: The phone number in international format (MOBILE_MONEY rail)
```
### Issue 3 of 3
openapi/components/schemas/common/GbpBeneficiary.yaml:6-30
**Field-level examples stripped with no replacement**
All property-level examples (`Jane Smith`, `1990-01-15`, `GB`, `jane.smith@example.com`, `+447700900123`) were removed and no top-level `example:` block was added to compensate. The rendered API reference will now show empty value hints for every optional field in `GbpBeneficiary`, making it harder for integrators to understand expected formats (e.g., the ISO-3166 alpha-2 code for `nationality` and `countryOfResidence`, the `YYYY-MM-DD` format for `birthDate`). Consider adding a single object-level `example:` block to preserve discoverability.
Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile
| bankName: | ||
| type: string | ||
| description: The name of the bank | ||
| minLength: 1 | ||
| maxLength: 255 |
There was a problem hiding this comment.
The
bankName description was narrowed from "The name of the bank or mobile-wallet provider" to "The name of the bank", but this field is still required for the MOBILE_MONEY rail (as stated in the schema description above). For MOBILE_MONEY payments there is no bank — the value is the mobile-wallet provider name. Dropping that clause leaves MOBILE_MONEY integrators without the guidance they need and could cause incorrect payloads to be submitted.
| bankName: | |
| type: string | |
| description: The name of the bank | |
| minLength: 1 | |
| maxLength: 255 | |
| bankName: | |
| type: string | |
| description: The name of the bank or mobile-wallet provider | |
| minLength: 1 | |
| maxLength: 255 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CnyAccountInfoBase.yaml
Line: 20-24
Comment:
The `bankName` description was narrowed from "The name of the bank or mobile-wallet provider" to "The name of the bank", but this field is still required for the MOBILE_MONEY rail (as stated in the schema description above). For MOBILE_MONEY payments there is no bank — the value is the mobile-wallet provider name. Dropping that clause leaves MOBILE_MONEY integrators without the guidance they need and could cause incorrect payloads to be submitted.
```suggestion
bankName:
type: string
description: The name of the bank or mobile-wallet provider
minLength: 1
maxLength: 255
```
How can I resolve this? If you propose a fix, please make it concise.| accountNumber: | ||
| type: string | ||
| description: The destination bank account number (BANK_TRANSFER rail) | ||
| description: The account number of the bank | ||
| minLength: 1 | ||
| maxLength: 34 | ||
| bankName: | ||
| type: string | ||
| description: The name of the bank | ||
| minLength: 1 | ||
| maxLength: 255 | ||
| phoneNumber: | ||
| type: string | ||
| description: The phone number in international format (MOBILE_MONEY rail) | ||
| description: The phone number in international format |
There was a problem hiding this comment.
The descriptions for
accountNumber and phoneNumber previously called out which payment rail each field applies to ("BANK_TRANSFER rail" / "MOBILE_MONEY rail"). Those rail hints were the only inline guidance telling integrators when to supply each field; removing them leaves users to rely solely on the prose block at the top of the schema.
| accountNumber: | |
| type: string | |
| description: The destination bank account number (BANK_TRANSFER rail) | |
| description: The account number of the bank | |
| minLength: 1 | |
| maxLength: 34 | |
| bankName: | |
| type: string | |
| description: The name of the bank | |
| minLength: 1 | |
| maxLength: 255 | |
| phoneNumber: | |
| type: string | |
| description: The phone number in international format (MOBILE_MONEY rail) | |
| description: The phone number in international format | |
| accountNumber: | |
| type: string | |
| description: The destination bank account number (BANK_TRANSFER rail) | |
| minLength: 1 | |
| maxLength: 34 | |
| bankName: | |
| type: string | |
| description: The name of the bank or mobile-wallet provider | |
| minLength: 1 | |
| maxLength: 255 | |
| phoneNumber: | |
| type: string | |
| description: The phone number in international format (MOBILE_MONEY rail) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CnyAccountInfoBase.yaml
Line: 15-27
Comment:
The descriptions for `accountNumber` and `phoneNumber` previously called out which payment rail each field applies to ("BANK_TRANSFER rail" / "MOBILE_MONEY rail"). Those rail hints were the only inline guidance telling integrators when to supply each field; removing them leaves users to rely solely on the prose block at the top of the schema.
```suggestion
accountNumber:
type: string
description: The destination bank account number (BANK_TRANSFER rail)
minLength: 1
maxLength: 34
bankName:
type: string
description: The name of the bank or mobile-wallet provider
minLength: 1
maxLength: 255
phoneNumber:
type: string
description: The phone number in international format (MOBILE_MONEY rail)
```
How can I resolve this? If you propose a fix, please make it concise.
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 schemascommon/PaymentInstructions.yaml— payment instructions oneOf (new currencies added)external_accounts/— per-currency external account schemas (reference common/)Please review the changes before merging.