Skip to content

chore: Sync account schemas#537

Closed
lightspark-copybara[bot] wants to merge 1 commit into
mainfrom
auto/sync-grid-schemas-20260602-182502
Closed

chore: Sync account schemas#537
lightspark-copybara[bot] wants to merge 1 commit into
mainfrom
auto/sync-grid-schemas-20260602-182502

Conversation

@lightspark-copybara
Copy link
Copy Markdown
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.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jun 2, 2026 6:25pm

Request Review

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

⚠️ Breaking OpenAPI changes detected

This PR introduces breaking changes to openapi.yaml:

API Changelog 2025-10-13 vs. 2025-10-13

API Changes

POST /agents/me/external-accounts

  • ⚠️ the request property allOf[subschema #1]/accountInfo/oneOf[subschema #24: PKR Account]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required

POST /customers/external-accounts

  • ⚠️ the request property allOf[subschema #1]/accountInfo/oneOf[subschema #24: PKR Account]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required

POST /platform/external-accounts

  • ⚠️ the request property accountInfo/oneOf[subschema #24: PKR Account]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required

POST webhook:agent-action

  • ⚠️ the request property allOf[subschema #2]/data/quote/allOf[#/components/schemas/Quote]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #36: PKR Account]/allOf[#/components/schemas/PkrAccountInfo]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required
  • ⚠️ the request property allOf[subschema #2]/data/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #2: Outgoing Transaction]/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #36: PKR Account]/allOf[#/components/schemas/PkrAccountInfo]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required

POST webhook:internal-account-status

  • ⚠️ the request property allOf[subschema #2]/data/fundingPaymentInstructions/items/accountOrWalletInfo/oneOf[subschema #36: PKR Account]/allOf[#/components/schemas/PkrAccountInfo]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required

POST webhook:outgoing-payment

  • ⚠️ the request property allOf[subschema #2]/data/allOf[subschema #2]/paymentInstructions/items/accountOrWalletInfo/oneOf[subschema #36: PKR Account]/allOf[#/components/schemas/PkrAccountInfo]/allOf[#/components/schemas/PkrAccountInfoBase]/bankName became required

Detected by oasdiff. This PR will need approval from an API reviewer before merge.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

✱ Stainless preview builds for grid

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

cli

chore(internal): regenerate SDK with no functional changes

csharp

fix(types): make BankName required in PKR account models

go

fix(types): make bankName required in PkrExternalAccountCreateInfoParam

kotlin

fix(types): make bankName required for PKR account types

openapi

fix(types): make bankName required in PkrAccountInfoBase

php

fix(types): make bankName required in PkrExternalAccountCreateInfo/PkrAccountInfo

python

fix(types): make bank_name required in PkrExternalAccountCreateInfo

ruby

fix(types): make bank_name required in PKR account models

typescript

fix(types): make bankName required in PKR external account types

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 ✅

grid-ruby studio · code · diff

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

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 ✅

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/f904b1b9a5009aa4999c6e4d04ef873a0f13ffbc/dist.tar.gz
⚠️ grid-python studio · code · diff

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅ (prev: build ⏭️) → lint ❗ (prev: lint ⏭️) → test ❗

pip install https://pkg.stainless.com/s/grid-python/f02cd5caf22a2e3d1c0ef31361fc3ff01ff2bb8e/grid-0.0.1-py3-none-any.whl
grid-csharp studio · code · diff

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

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅ (prev: build ⏭️) → lint ❗test ❗

go get github.com/stainless-sdks/grid-go@9d798b723c8e97fabdcf3f53168a540ae0edecd7
grid-php studio · code · diff

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

grid-cli studio · code · diff

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


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-06-02 18:32:07 UTC

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 2, 2026

Greptile Summary

This auto-synced PR promotes bankName from an optional field to a globally required field in PkrAccountInfoBase, aligning the Grid API schema with the VASP adapter definitions in sparkcore. All three files (openapi/components/schemas/common/PkrAccountInfoBase.yaml, openapi.yaml, mintlify/openapi.yaml) carry the identical change.

  • bankName is added to the required array and moved earlier in the properties list; the description is updated to note it is now required for BANK_TRANSFER in addition to MOBILE_MONEY.
  • This is a breaking change for existing BANK_TRANSFER clients that previously omitted bankName — they will now fail schema validation.
  • The two bundled files (openapi.yaml, mintlify/openapi.yaml) appear to have been updated consistently with running make build, but the repo's own rules say these files should never be edited directly.

Confidence Score: 3/5

The change makes bankName globally required in PkrAccountInfoBase, which is a breaking change for any BANK_TRANSFER client that previously omitted this field.

Adding bankName to the top-level required array means all existing PKR BANK_TRANSFER integrations that don't supply it will now fail schema validation without any prior notice. The description still says requirements are conditional on paymentRails, which contradicts the unconditional enforcement in the schema. This warrants a second look from someone who can confirm existing clients have been accounted for before merging.

openapi/components/schemas/common/PkrAccountInfoBase.yaml — specifically whether existing BANK_TRANSFER callers have been audited for the new required field.

Important Files Changed

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
Loading

Fix All in Claude Code

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

Comment on lines 1 to 5
type: object
required:
- accountType
- bankName
description: 'Required fields depend on the selected paymentRails:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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.

Fix in Claude Code

Comment thread openapi.yaml
Comment on lines 11533 to 11540
type: object
required:
- accountType
- bankName
description: |-
Required fields depend on the selected paymentRails:
- BANK_TRANSFER: accountNumber
- BANK_TRANSFER: accountNumber, bankName
- MOBILE_MONEY: bankName, phoneNumber
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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)

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!

Fix in Claude Code

@lightspark-copybara
Copy link
Copy Markdown
Contributor Author

Superseded by #539

@lightspark-copybara lightspark-copybara Bot deleted the auto/sync-grid-schemas-20260602-182502 branch June 2, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants