Add CnyExternalAccountCreateInfo + register in CreateInfo OneOf#552
Add CnyExternalAccountCreateInfo + register in CreateInfo OneOf#552mohamedwane wants to merge 1 commit into
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-go studio · code · diff
|
| 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyExternalAccountCreateInfo` |
| 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyBeneficiary` |
✅ grid-python studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅→build ✅→lint ❗→test ❗pip install https://pkg.stainless.com/s/grid-python/d1d6603a5a3bfca46abd95cc84eb349c5bb0b81b/grid-0.0.1-py3-none-any.whlNew diagnostics (2 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyExternalAccountCreateInfo` 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyBeneficiary`
✅ grid-csharp studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️→build ❗→lint ✅→test ❗New diagnostics (3 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyExternalAccountCreateInfo` 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyBeneficiary` 💡 Name/Renamed: 260 names were renamed due to language constraints, so fallback names will be used instead.
✅ grid-typescript studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅→build ✅→lint ✅→test ✅npm install https://pkg.stainless.com/s/grid-typescript/ca0d74be91688ae84b26c453c52886eff1f1c8a8/dist.tar.gzNew diagnostics (2 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyExternalAccountCreateInfo` 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyBeneficiary`
✅ grid-php studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅→lint ✅→test ✅New diagnostics (2 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyExternalAccountCreateInfo` 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyBeneficiary`
✅ grid-cli studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️→build ❗→lint ❗→test ❗New diagnostics (2 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyExternalAccountCreateInfo` 💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CnyBeneficiary`
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-05 02:33:26 UTC
Greptile SummaryThis PR adds the missing
Confidence Score: 5/5Safe to merge — adds a well-scoped, missing schema file and its OneOf registration with no changes to existing entries. The change is additive only: a new YAML file and two new lines in the OneOf registration. All $ref targets exist and resolve. The discriminator mapping entry is present and alphabetically ordered. No existing schemas or endpoints are modified. No files require special attention.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/CnyExternalAccountCreateInfo.yaml | New CNY create-side schema, correctly mirrors BdtExternalAccountCreateInfo.yaml with CNY-specific refs; all referenced schemas exist and resolve |
| openapi/components/schemas/external_accounts/ExternalAccountCreateInfoOneOf.yaml | Adds CnyExternalAccountCreateInfo to both the oneOf array and the discriminator.mapping block; CNY_ACCOUNT entry correctly placed alphabetically |
| openapi.yaml | Regenerated bundle reflecting the new CnyExternalAccountCreateInfo schema and OneOf registration |
| mintlify/openapi.yaml | Mintlify bundle regenerated to include CnyExternalAccountCreateInfo for docs |
Sequence Diagram
sequenceDiagram
participant Client
participant API as POST /customers/external-accounts
participant Discriminator as ExternalAccountCreateInfoOneOf
participant Schema as CnyExternalAccountCreateInfo
Client->>API: "{ accountType: "CNY_ACCOUNT", ... }"
API->>Discriminator: resolve oneOf via discriminator
Discriminator->>Schema: "mapping["CNY_ACCOUNT"] -> CnyExternalAccountCreateInfo.yaml"
Schema->>Schema: "allOf [BaseExternalAccountInfo, CnyAccountInfoBase, {beneficiary}]"
Schema-->>API: validated
API-->>Client: 200 OK
Reviews (2): Last reviewed commit: "Add CnyExternalAccountCreateInfo + regis..." | Re-trigger Greptile
The auto-sync workflow's create_external_accounts.py only generates
the read-side `{Currency}ExternalAccountInfo.yaml`; the create-side
`{Currency}ExternalAccountCreateInfo.yaml` is hand-authored per
corridor and was missed when CNY landed via #551. Without the Create
variant in `ExternalAccountCreateInfoOneOf`, the discriminator can't
dispatch `accountType: CNY_ACCOUNT` on POST /customers/external-
accounts and the request fails with "did not match any expected shape".
This adds the missing schema (mirroring the existing
BdtExternalAccountCreateInfo template) and inserts the $ref in the
CreateInfoOneOf alphabetically between Cad and Cop.
519bcee to
4451e8b
Compare
|
Good catch — fixed in 4451e8b. Added |
Summary
CnyExternalAccountCreateInfo.yaml(hand-authored, mirrors the existingBdtExternalAccountCreateInfo.yamltemplate) and registers it inExternalAccountCreateInfoOneOf.yaml.create_external_accounts.pyonly generates the read-side{Currency}ExternalAccountInfo.yaml; the create-side{Currency}ExternalAccountCreateInfo.yamlis hand-authored per corridor and was missed when CNY landed via chore: Sync account schemas #551. Without the create variant in the OneOf, the discriminator can't dispatchaccountType: CNY_ACCOUNTonPOST /customers/external-accountsand the request fails with"did not match any expected shape".Test plan
npm run build:openapiproduces a bundle that containsCnyExternalAccountCreateInfo(line 15259 in the regeneratedopenapi.yaml).update_schema.shand confirmgrid_api/models/cny_external_account_create_info.pyexists.