chore: Sync account schemas#537
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 Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-typescript studio · code · diff
|
Greptile SummaryThis auto-synced PR promotes
Confidence Score: 3/5The change makes Adding
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/PkrAccountInfoBase.yaml | Adds bankName to the required array and reorders properties — a breaking change for existing BANK_TRANSFER clients that did not previously need to supply bankName. |
| openapi.yaml | Bundled output updated in sync with the source schema change; content is consistent but the file should not be edited directly per repo rules. |
| mintlify/openapi.yaml | Mintlify bundled output updated in sync with the source schema change; identical diff to openapi.yaml. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PkrAccountInfoBase request] --> B{paymentRails?}
B -->|BANK_TRANSFER| C[Required: accountType, bankName, accountNumber]
B -->|MOBILE_MONEY| D[Required: accountType, bankName, phoneNumber]
C --> E[Schema validation passes ✓]
D --> E
F[Old schema: bankName optional for BANK_TRANSFER] -.->|Breaking change| C
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
openapi/components/schemas/common/PkrAccountInfoBase.yaml:1-5
**Breaking change: `bankName` now globally required**
`bankName` has been added to the top-level `required` array, making it mandatory for every `PkrAccountInfo` request regardless of `paymentRails`. Any existing BANK_TRANSFER client that doesn't supply `bankName` will now fail schema validation. The description still reads "Required fields depend on the selected paymentRails," which creates a contradiction — the description implies conditional requirements, but the `required` array enforces it unconditionally. If the intent is to mirror sparkcore's VASP adapter behaviour precisely, this is fine, but existing callers need to be made aware of the change.
### Issue 2 of 2
openapi.yaml:11533-11540
**Bundled file edited directly**
Per the repo's `CLAUDE.md`, `openapi.yaml` (root) and `mintlify/openapi.yaml` are generated outputs that should never be edited directly — changes should be made only in `openapi/` and then regenerated via `make build`. If this sync bot edited these files directly instead of running `make build`, the bundle may become stale the next time someone runs `make build` locally from a different base. The content here is consistent with the source file, so the immediate risk is low, but the process should be verified.
Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile
| type: object | ||
| required: | ||
| - accountType | ||
| - bankName | ||
| description: 'Required fields depend on the selected paymentRails: |
There was a problem hiding this comment.
Breaking change:
bankName now globally required
bankName has been added to the top-level required array, making it mandatory for every PkrAccountInfo request regardless of paymentRails. Any existing BANK_TRANSFER client that doesn't supply bankName will now fail schema validation. The description still reads "Required fields depend on the selected paymentRails," which creates a contradiction — the description implies conditional requirements, but the required array enforces it unconditionally. If the intent is to mirror sparkcore's VASP adapter behaviour precisely, this is fine, but existing callers need to be made aware of the change.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/PkrAccountInfoBase.yaml
Line: 1-5
Comment:
**Breaking change: `bankName` now globally required**
`bankName` has been added to the top-level `required` array, making it mandatory for every `PkrAccountInfo` request regardless of `paymentRails`. Any existing BANK_TRANSFER client that doesn't supply `bankName` will now fail schema validation. The description still reads "Required fields depend on the selected paymentRails," which creates a contradiction — the description implies conditional requirements, but the `required` array enforces it unconditionally. If the intent is to mirror sparkcore's VASP adapter behaviour precisely, this is fine, but existing callers need to be made aware of the change.
How can I resolve this? If you propose a fix, please make it concise.| type: object | ||
| required: | ||
| - accountType | ||
| - bankName | ||
| description: |- | ||
| Required fields depend on the selected paymentRails: | ||
| - BANK_TRANSFER: accountNumber | ||
| - BANK_TRANSFER: accountNumber, bankName | ||
| - MOBILE_MONEY: bankName, phoneNumber |
There was a problem hiding this comment.
Per the repo's CLAUDE.md, openapi.yaml (root) and mintlify/openapi.yaml are generated outputs that should never be edited directly — changes should be made only in openapi/ and then regenerated via make build. If this sync bot edited these files directly instead of running make build, the bundle may become stale the next time someone runs make build locally from a different base. The content here is consistent with the source file, so the immediate risk is low, but the process should be verified.
Context Used: CLAUDE.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi.yaml
Line: 11533-11540
Comment:
**Bundled file edited directly**
Per the repo's `CLAUDE.md`, `openapi.yaml` (root) and `mintlify/openapi.yaml` are generated outputs that should never be edited directly — changes should be made only in `openapi/` and then regenerated via `make build`. If this sync bot edited these files directly instead of running `make build`, the bundle may become stale the next time someone runs `make build` locally from a different base. The content here is consistent with the source file, so the immediate risk is low, but the process should be verified.
**Context Used:** CLAUDE.md ([source](https://app.greptile.com/lightspark/github/lightsparkdev/grid-api/-/custom-context?memory=21abe025-35ab-4ae8-a4a1-0071c2ac3b98))
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!
|
Superseded by #539 |
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.