Skip to content

Refactor account schemas to extract base types and create separate external account schemas#327

Open
AaryamanBhute wants to merge 2 commits intomainfrom
handsomely-den
Open

Refactor account schemas to extract base types and create separate external account schemas#327
AaryamanBhute wants to merge 2 commits intomainfrom
handsomely-den

Conversation

@AaryamanBhute
Copy link
Copy Markdown
Contributor

@AaryamanBhute AaryamanBhute commented Apr 10, 2026

No description provided.

…ails

Aligns with webdev PR lightsparkdev/webdev#25433. For each currency:
- Created {Currency}AccountInfoBase.yaml (without paymentRails)
- Rewrote {Currency}AccountInfo.yaml as allOf composition (Base + paymentRails)
- Created {Currency}ExternalAccountCreateInfo.yaml referencing Base (no paymentRails)
- Created ExternalAccountCreateInfoOneOf.yaml discriminated union
- Updated create request schemas to use CreateInfoOneOf
- Removed paymentRails from request body examples in path files

This enables request schemas to reference Base directly (no paymentRails)
while response schemas continue using the full AccountInfo (with paymentRails).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

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

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Apr 10, 2026 9:40pm

Request Review

Copy link
Copy Markdown
Contributor Author

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

✱ Stainless preview builds

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

kotlin

docs: add sidebar icon for Discoveries API reference group (#318)

openapi

fix(types): make paymentRails optional, add create schemas for fiat account types

python

fix(types): remove payment_rails field, consolidate account types in external_accounts

typescript

fix(types): require beneficiary, remove paymentRails in external account types

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

⚠️ grid-typescript studio · code · diff

Your SDK build had at least one new error diagnostic, which is a regression from the base state.
generate ❗build ✅lint ✅ (prev: lint ❗) → test ✅

npm install https://pkg.stainless.com/s/grid-typescript/82599b306527ce07759ad64a099a6e1660cfcc80/dist.tar.gz
New diagnostics (16 error, 58 note)
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/UsdAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/BrlAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/MxnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/DkkAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/EurAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/InrAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/NgnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/CadAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/GbpAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/HkdAccountInfo`
⚠️ grid-kotlin studio · code · diff

Your SDK build had at least one new error diagnostic, which is a regression from the base state.
generate ❗build ✅lint ✅test ✅

New diagnostics (16 error, 282 note)
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/UsdAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/BrlAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/MxnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/DkkAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/EurAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/InrAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/NgnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/CadAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/GbpAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/HkdAccountInfo`
⚠️ grid-openapi studio · code · diff

Your SDK build had at least one new error diagnostic, which is a regression from the base state.
generate ❗

New diagnostics (16 error, 60 note)
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/UsdAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/BrlAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/MxnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/DkkAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/EurAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/InrAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/NgnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/CadAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/GbpAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/HkdAccountInfo`
⚠️ grid-python studio · code · diff

Your SDK build had at least one new error diagnostic, which is a regression from the base state.
generate ❗build ✅lint ✅ (prev: lint ❗) → test ✅

pip install https://pkg.stainless.com/s/grid-python/4d469270e661c219d1a9f6c848de285b4240afb9/grid-0.0.1-py3-none-any.whl
New diagnostics (16 error, 58 note)
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/UsdAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/BrlAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/MxnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/DkkAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/EurAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/InrAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/NgnAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/CadAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/GbpAccountInfo`
Reference/NotFound: Ignored reference not present in OpenAPI spec: `#/components/schemas/HkdAccountInfo`

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-04-10 21:45:42 UTC

@AaryamanBhute AaryamanBhute changed the title docs: add sidebar icon for Discoveries API reference group (#318) Refactor account schemas to extract base types and create separate external account schemas Apr 10, 2026
@AaryamanBhute AaryamanBhute marked this pull request as ready for review April 10, 2026 21:10
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 10, 2026

Too many files changed for review. (181 files found, 100 file limit)

@AaryamanBhute AaryamanBhute requested review from a team, pengying and shreyav April 10, 2026 21:21
Copy link
Copy Markdown
Contributor

Is there a one of that needs to be updated with the new structure?

…entAccountInfo

ExternalAccountInfo and PaymentAccountInfo schemas previously referenced
{Currency}AccountInfo.yaml (now an allOf composition), creating nested allOf
chains that Stainless couldn't resolve — causing accountType to be dropped
from required in generated SDKs.

Fix: these schemas now reference {Currency}AccountInfoBase.yaml directly
(flat) and inline the paymentRails property, eliminating nested allOf.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants