chore: Sync account schemas#546
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
✅ grid-kotlin studio · code
|
Greptile SummaryThis auto-synced PR adds
Confidence Score: 4/5Safe to merge once confirmed the backend already enforces The schema changes are internally consistent across all five currencies and both bundled files. The one area deserving attention is that adding The five
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/BdtAccountInfoBase.yaml | Adds bankName as a globally required field and new property; breaking change for existing BDT consumers who don't supply it. |
| openapi/components/schemas/common/CopAccountInfoBase.yaml | Adds bankName as globally required and new property; mirrors BDT pattern consistently. |
| openapi/components/schemas/common/EgpAccountInfoBase.yaml | Adds bankName as globally required and new property; mirrors BDT pattern consistently. |
| openapi/components/schemas/common/GhsAccountInfoBase.yaml | Adds bankName as globally required and new property; mirrors BDT pattern consistently. |
| openapi/components/schemas/common/PkrAccountInfoBase.yaml | Moves bankName from bottom of properties to top, promotes it from MOBILE_MONEY-only requirement to globally required (now includes BANK_TRANSFER); existing BANK_TRANSFER consumers not sending bankName will break. |
| openapi.yaml | Generated bundle updated in sync with component YAML files; consistent with source schemas. |
| mintlify/openapi.yaml | Mintlify bundle updated identically to openapi.yaml; changes are consistent and correct. |
Sequence Diagram
sequenceDiagram
participant Client
participant GridAPI
participant Validator
Client->>GridAPI: POST /payment (BDT/COP/EGP/GHS/PKR account)
GridAPI->>Validator: Validate request body
alt bankName present (new requirement)
Validator-->>GridAPI: Valid
GridAPI-->>Client: 200 OK
else bankName missing (previously valid)
Validator-->>GridAPI: Required field missing
GridAPI-->>Client: 422 Validation Error
end
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
openapi/components/schemas/common/BdtAccountInfoBase.yaml:2-4
**Breaking change: `bankName` added as globally required**
`bankName` is now in the top-level `required` array, making it mandatory for every request that includes any of these five schemas (BDT, COP, EGP, GHS, PKR). Any existing API consumer submitting a valid payload today — one that omits `bankName` — will receive a validation error after this change lands. For PKR this is a double-impact: `bankName` was previously only documented as required for `MOBILE_MONEY`; it is now required for `BANK_TRANSFER` as well. Please confirm the backend already enforces `bankName` on all existing live traffic so that the schema change and backend enforcement land together, and consider whether a changelog notice or versioned endpoint bump is needed.
Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile
| required: | ||
| - accountType | ||
| - bankName |
There was a problem hiding this comment.
Breaking change:
bankName added as globally required
bankName is now in the top-level required array, making it mandatory for every request that includes any of these five schemas (BDT, COP, EGP, GHS, PKR). Any existing API consumer submitting a valid payload today — one that omits bankName — will receive a validation error after this change lands. For PKR this is a double-impact: bankName was previously only documented as required for MOBILE_MONEY; it is now required for BANK_TRANSFER as well. Please confirm the backend already enforces bankName on all existing live traffic so that the schema change and backend enforcement land together, and consider whether a changelog notice or versioned endpoint bump is needed.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/BdtAccountInfoBase.yaml
Line: 2-4
Comment:
**Breaking change: `bankName` added as globally required**
`bankName` is now in the top-level `required` array, making it mandatory for every request that includes any of these five schemas (BDT, COP, EGP, GHS, PKR). Any existing API consumer submitting a valid payload today — one that omits `bankName` — will receive a validation error after this change lands. For PKR this is a double-impact: `bankName` was previously only documented as required for `MOBILE_MONEY`; it is now required for `BANK_TRANSFER` as well. Please confirm the backend already enforces `bankName` on all existing live traffic so that the schema change and backend enforcement land together, and consider whether a changelog notice or versioned endpoint bump is needed.
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!
## Summary Updates documentation and Grid Visualizer to match recent OpenAPI schema changes for account types (BDT, COP, EGP, GHS, PKR). **Changes:** - **Mintlify docs**: Add missing `bankName` field to Colombia (COP) mobile money example - **Grid Visualizer**: Update account-types.ts to match schema field requirements: - BDT_ACCOUNT: Add required `bankName` field - COP_ACCOUNT: Add required `bankName` and `bankAccountType` fields - EGP_ACCOUNT: Fix fields to match schema (`iban` for bank transfer, not `accountNumber`; remove non-existent `swiftCode`) - GHS_ACCOUNT: Add required `bankName` field - PKR_ACCOUNT: Reorder fields with `bankName` first (required for all rails, not just mobile money) **Related commits:** - bfdf3e7 chore: Sync account schemas (#546) ## Test plan - [ ] Verify lint passes (`make lint`) - [ ] Review account field specs in Grid Visualizer match OpenAPI schemas - [ ] Verify COP mobile money example includes required `bankName` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.