feat: add NGN and CAD external account and beneficiary schemas#226
feat: add NGN and CAD external account and beneficiary schemas#226AaryamanBhute merged 3 commits intomainfrom
Conversation
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript ✅ grid-python studio · code
✅ grid-kotlin studio · code
✅ grid-typescript studio · code
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThis PR adds NGN (Nigerian Naira) and CAD (Canadian Dollar) support to the external accounts system by introducing new beneficiary schemas, external account info schemas, and wiring them into the
Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/CadBeneficiary.yaml | New CAD beneficiary schema — missing title: Individual Beneficiary that all other beneficiary schemas have (added in PR #221 for Mintlify rendering). |
| openapi/components/schemas/common/NgnBeneficiary.yaml | New NGN beneficiary schema — missing title: Individual Beneficiary that all other beneficiary schemas have (added in PR #221 for Mintlify rendering). |
| openapi/components/schemas/external_accounts/CadExternalAccountInfo.yaml | New CAD external account info — uses title as $ref siblings in beneficiary oneOf, which is the pattern PR #221 explicitly removed from other schemas because titles were lost during Mintlify rendering. |
| openapi/components/schemas/external_accounts/NgnExternalAccountInfo.yaml | New NGN external account info — same pattern inconsistency as CAD with title as $ref siblings in beneficiary oneOf instead of in the schema files. |
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Adds CAD and NGN to the oneOf/discriminator. Also re-adds title as $ref siblings for all entries — redundant with schema-level titles but not harmful here since the top-level schema titles are authoritative. |
| openapi/components/schemas/external_accounts/ExternalAccountType.yaml | Correctly adds CAD_ACCOUNT and NGN_ACCOUNT enum values in proper position. |
| .stainless/stainless.yml | Adds cad_account_info and ngn_account_info models to the Stainless configuration. Correctly placed in alphabetical order. |
| openapi.yaml | Generated bundle — correctly includes all new schemas and titles. Consistent with mintlify/openapi.yaml. |
| mintlify/openapi.yaml | Generated bundle — identical to openapi.yaml, correctly includes all new schemas. |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
class ExternalAccountInfoOneOf {
<<oneOf discriminator>>
accountType: ExternalAccountType
}
class CadExternalAccountInfo {
<<allOf>>
title: CAD Account
}
class NgnExternalAccountInfo {
<<allOf>>
title: NGN Account
}
class BaseExternalAccountInfo {
accountType: ExternalAccountType
}
class CadAccountInfo {
accountType: CAD_ACCOUNT
bankCode: string
branchCode: string
accountNumber: string
}
class NgnAccountInfo {
accountType: NGN_ACCOUNT
accountNumber: string
bankName: string
}
class CadBeneficiary {
beneficiaryType: INDIVIDUAL
fullName: string
birthDate: string
address: Address
}
class NgnBeneficiary {
beneficiaryType: INDIVIDUAL
fullName: string
birthDate: string
address: Address
}
class BusinessBeneficiary {
beneficiaryType: BUSINESS
legalName: string
}
ExternalAccountInfoOneOf --> CadExternalAccountInfo : CAD_ACCOUNT
ExternalAccountInfoOneOf --> NgnExternalAccountInfo : NGN_ACCOUNT
CadExternalAccountInfo --|> BaseExternalAccountInfo
CadExternalAccountInfo --|> CadAccountInfo
NgnExternalAccountInfo --|> BaseExternalAccountInfo
NgnExternalAccountInfo --|> NgnAccountInfo
CadExternalAccountInfo --> CadBeneficiary : INDIVIDUAL
CadExternalAccountInfo --> BusinessBeneficiary : BUSINESS
NgnExternalAccountInfo --> NgnBeneficiary : INDIVIDUAL
NgnExternalAccountInfo --> BusinessBeneficiary : BUSINESS
Last reviewed commit: 7f1d70f
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add title to NgnExternalAccountInfo and CadExternalAccountInfo discriminated schemas. Remove redundant discriminator from BaseExternalAccountInfo since ExternalAccountInfoOneOf already defines it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e2ad977 to
7f1d70f
Compare
| @@ -0,0 +1,32 @@ | |||
| type: object | |||
There was a problem hiding this comment.
Missing title: Individual Beneficiary
Every other beneficiary schema in the repo (BRL, DKK, EUR, GBP, HKD, IDR, INR, MXN, MYR, PHP, SGD, THB, USD, VND) has title: Individual Beneficiary as the first line. This was specifically added in PR #221 to fix Mintlify rendering — titles placed as $ref siblings (like in CadExternalAccountInfo.yaml line 11) are lost during Mintlify's schema resolution, so they must live in the schema file itself.
Without this, the CAD beneficiary will render without a title in Mintlify docs.
The same issue applies to openapi/components/schemas/common/NgnBeneficiary.yaml.
| type: object | |
| title: Individual Beneficiary | |
| type: object |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CadBeneficiary.yaml
Line: 1
Comment:
**Missing `title: Individual Beneficiary`**
Every other beneficiary schema in the repo (BRL, DKK, EUR, GBP, HKD, IDR, INR, MXN, MYR, PHP, SGD, THB, USD, VND) has `title: Individual Beneficiary` as the first line. This was specifically added in PR #221 to fix Mintlify rendering — titles placed as `$ref` siblings (like in `CadExternalAccountInfo.yaml` line 11) are lost during Mintlify's schema resolution, so they must live in the schema file itself.
Without this, the CAD beneficiary will render without a title in Mintlify docs.
The same issue applies to `openapi/components/schemas/common/NgnBeneficiary.yaml`.
```suggestion
title: Individual Beneficiary
type: object
```
How can I resolve this? If you propose a fix, please make it concise.| oneOf: | ||
| - title: Individual Beneficiary | ||
| $ref: ../common/CadBeneficiary.yaml | ||
| - title: Business Beneficiary | ||
| $ref: ../common/BusinessBeneficiary.yaml |
There was a problem hiding this comment.
Inconsistent title placement for beneficiary oneOf
The title attributes on lines 11 and 13 are placed as $ref siblings, but PR #221 explicitly moved titles out of $ref siblings and into the schema files themselves because Mintlify's schema resolution was losing $ref-sibling titles. All existing ExternalAccountInfo schemas (BRL, DKK, EUR, etc.) had these sibling titles removed in that PR.
Since CadBeneficiary.yaml is missing its own title: Individual Beneficiary (and BusinessBeneficiary.yaml already has title: Business Beneficiary), the recommended fix is to:
- Add
title: Individual BeneficiarytoCadBeneficiary.yaml - Remove the
titlesiblings here to match the existing pattern:
| oneOf: | |
| - title: Individual Beneficiary | |
| $ref: ../common/CadBeneficiary.yaml | |
| - title: Business Beneficiary | |
| $ref: ../common/BusinessBeneficiary.yaml | |
| oneOf: | |
| - $ref: ../common/CadBeneficiary.yaml | |
| - $ref: ../common/BusinessBeneficiary.yaml |
The same applies to NgnExternalAccountInfo.yaml.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/CadExternalAccountInfo.yaml
Line: 10-14
Comment:
**Inconsistent title placement for beneficiary `oneOf`**
The `title` attributes on lines 11 and 13 are placed as `$ref` siblings, but PR #221 explicitly moved titles out of `$ref` siblings and into the schema files themselves because Mintlify's schema resolution was losing `$ref`-sibling titles. All existing `ExternalAccountInfo` schemas (BRL, DKK, EUR, etc.) had these sibling titles removed in that PR.
Since `CadBeneficiary.yaml` is missing its own `title: Individual Beneficiary` (and `BusinessBeneficiary.yaml` already has `title: Business Beneficiary`), the recommended fix is to:
1. Add `title: Individual Beneficiary` to `CadBeneficiary.yaml`
2. Remove the `title` siblings here to match the existing pattern:
```suggestion
oneOf:
- $ref: ../common/CadBeneficiary.yaml
- $ref: ../common/BusinessBeneficiary.yaml
```
The same applies to `NgnExternalAccountInfo.yaml`.
How can I resolve this? If you propose a fix, please make it concise.| oneOf: | ||
| - $ref: ./BrlExternalAccountInfo.yaml | ||
| - $ref: ./DkkExternalAccountInfo.yaml | ||
| - $ref: ./EurExternalAccountInfo.yaml | ||
| - $ref: ./GbpExternalAccountInfo.yaml | ||
| - $ref: ./HkdExternalAccountInfo.yaml | ||
| - $ref: ./IdrExternalAccountInfo.yaml | ||
| - $ref: ./InrExternalAccountInfo.yaml | ||
| - $ref: ./MxnExternalAccountInfo.yaml | ||
| - $ref: ./MyrExternalAccountInfo.yaml | ||
| - $ref: ./PhpExternalAccountInfo.yaml | ||
| - $ref: ./SgdExternalAccountInfo.yaml | ||
| - $ref: ./ThbExternalAccountInfo.yaml | ||
| - $ref: ./UsdExternalAccountInfo.yaml | ||
| - $ref: ./VndExternalAccountInfo.yaml | ||
| - $ref: ./SparkWalletExternalAccountInfo.yaml | ||
| - $ref: ./LightningExternalAccountInfo.yaml | ||
| - $ref: ./SolanaWalletExternalAccountInfo.yaml | ||
| - $ref: ./TronWalletExternalAccountInfo.yaml | ||
| - $ref: ./PolygonWalletExternalAccountInfo.yaml | ||
| - $ref: ./BaseWalletExternalAccountInfo.yaml | ||
| - title: BRL Account | ||
| $ref: ./BrlExternalAccountInfo.yaml | ||
| - title: CAD Account | ||
| $ref: ./CadExternalAccountInfo.yaml | ||
| - title: DKK Account | ||
| $ref: ./DkkExternalAccountInfo.yaml | ||
| - title: EUR Account | ||
| $ref: ./EurExternalAccountInfo.yaml | ||
| - title: GBP Account | ||
| $ref: ./GbpExternalAccountInfo.yaml | ||
| - title: HKD Account | ||
| $ref: ./HkdExternalAccountInfo.yaml | ||
| - title: IDR Account | ||
| $ref: ./IdrExternalAccountInfo.yaml | ||
| - title: INR Account | ||
| $ref: ./InrExternalAccountInfo.yaml | ||
| - title: MXN Account | ||
| $ref: ./MxnExternalAccountInfo.yaml | ||
| - title: MYR Account | ||
| $ref: ./MyrExternalAccountInfo.yaml | ||
| - title: NGN Account | ||
| $ref: ./NgnExternalAccountInfo.yaml | ||
| - title: PHP Account | ||
| $ref: ./PhpExternalAccountInfo.yaml | ||
| - title: SGD Account | ||
| $ref: ./SgdExternalAccountInfo.yaml | ||
| - title: THB Account | ||
| $ref: ./ThbExternalAccountInfo.yaml | ||
| - title: USD Account | ||
| $ref: ./UsdExternalAccountInfo.yaml | ||
| - title: VND Account | ||
| $ref: ./VndExternalAccountInfo.yaml | ||
| - title: Spark Wallet | ||
| $ref: ./SparkWalletExternalAccountInfo.yaml | ||
| - title: Lightning | ||
| $ref: ./LightningExternalAccountInfo.yaml | ||
| - title: Solana Wallet | ||
| $ref: ./SolanaWalletExternalAccountInfo.yaml | ||
| - title: Tron Wallet | ||
| $ref: ./TronWalletExternalAccountInfo.yaml | ||
| - title: Polygon Wallet | ||
| $ref: ./PolygonWalletExternalAccountInfo.yaml | ||
| - title: Base Wallet | ||
| $ref: ./BaseWalletExternalAccountInfo.yaml |
There was a problem hiding this comment.
Re-adding title as $ref siblings reverses PR #221 cleanup
PR #221 removed title from $ref siblings in this file and instead placed titles directly in each schema file (e.g., BrlExternalAccountInfo.yaml has title: BRL Account). This was done because Mintlify was losing $ref-sibling titles during schema resolution.
This PR re-adds titles as $ref siblings for all 21 entries, making them redundant with the titles already defined in each schema file. While this likely won't cause a rendering bug at this level (since the schema-level titles are authoritative), it creates duplication and inconsistency with the established pattern. Consider removing the title siblings to keep the file consistent with the approach established in PR #221.
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!
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 1-45
Comment:
**Re-adding `title` as `$ref` siblings reverses PR #221 cleanup**
PR #221 removed `title` from `$ref` siblings in this file and instead placed titles directly in each schema file (e.g., `BrlExternalAccountInfo.yaml` has `title: BRL Account`). This was done because Mintlify was losing `$ref`-sibling titles during schema resolution.
This PR re-adds titles as `$ref` siblings for all 21 entries, making them redundant with the titles already defined in each schema file. While this likely won't cause a rendering bug at this level (since the schema-level titles are authoritative), it creates duplication and inconsistency with the established pattern. Consider removing the `title` siblings to keep the file consistent with the approach established in PR #221.
<sub>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!</sub>
How can I resolve this? If you propose a fix, please make it concise.## Summary - Remove `title:` lines that were siblings to `$ref:` in `ExternalAccountInfoOneOf.yaml` (22 entries) — these are ignored per the OpenAPI spec and cause Mintlify to not display titles correctly - Remove the same `title:/$ref:` sibling pattern from `CadExternalAccountInfo` and `NgnExternalAccountInfo` beneficiary oneOf entries (added in #226) - Add missing `title: Individual Beneficiary` to `CadBeneficiary.yaml` and `NgnBeneficiary.yaml` so Mintlify renders the oneOf type selector properly ## Test plan - [x] `make build` passes - [x] `make lint` passes (22 pre-existing warnings, 0 errors) - [ ] Verify Mintlify renders external account info oneOf type selector with correct labels - [ ] Verify beneficiary oneOf renders correctly for CAD and NGN accounts 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
No description provided.