Docs: sync INR, GTQ, JMD account schemas with OpenAPI#661
Conversation
Following the account schema sync in d365c9c, this updates docs, Kotlin sample, and Grid Visualizer to match the new schemas: **INR_ACCOUNT** (most significant): - Now supports NEFT and RTGS rails in addition to UPI - Added accountNumber, ifsc, rail, bankName fields for bank transfers - Updated external-accounts.mdx with NEFT/RTGS example - Updated country-support.mdx to list all three rails - Updated Kotlin sample to handle optional vpa/bank fields **GTQ_ACCOUNT**: - Fixed fields to match schema: accountNumber, bankAccountType, bankName - Removed phoneNumber (not in schema) **JMD_ACCOUNT**: - Added missing required bankName field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Greptile SummaryThis PR syncs documentation, the Grid Visualizer field definitions, and the Kotlin sample with the INR/GTQ/JMD schema changes introduced in d365c9c — adding NEFT and RTGS support for India and correcting the field lists for Guatemala and Jamaica.
Confidence Score: 3/5The documentation curl examples are correct, but both the Grid Visualizer and Kotlin sample will emit invalid INR account creation requests because the required The Mintlify docs changes are accurate and safe. The GTQ and JMD visualizer fixes look correct. However, the INR changes in two separate artifacts — components/grid-visualizer/src/data/account-types.ts and samples/kotlin/src/main/kotlin/com/grid/sample/routes/ExternalAccounts.kt both need
|
| Filename | Overview |
|---|---|
| components/grid-visualizer/src/data/account-types.ts | Adds NEFT/RTGS fields to INR_ACCOUNT, fixes GTQ/JMD fields — but omits required paymentRails from INR spec, causing the code generator to emit invalid API calls |
| samples/kotlin/src/main/kotlin/com/grid/sample/routes/ExternalAccounts.kt | Converts INR fields to optional apply block for multi-rail support, but never reads or sets paymentRails — a required field per the OpenAPI schema |
| components/grid-visualizer/src/data/currencies.ts | Updates INR label to "UPI / Bank Account" and adds NEFT/RTGS to allRails — straightforward and correct |
| mintlify/snippets/country-support.mdx | Single-line update adding NEFT and RTGS to India's supported rail list — accurate and correct |
| mintlify/snippets/external-accounts.mdx | Expands India section with UPI and NEFT/RTGS curl examples; both correctly include the required paymentRails field and matching rail/vpa fields per the OpenAPI spec |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[INR Account Creation Request] --> B{Payment Rail?}
B -->|UPI| C["vpa required\npaymentRails: [UPI]"]
B -->|NEFT| D["accountNumber + ifsc + rail required\npaymentRails: [NEFT]"]
B -->|RTGS| E["accountNumber + ifsc + rail required\npaymentRails: [RTGS]"]
C --> F[Grid Visualizer\ncode-generator.ts]
D --> F
E --> F
F --> G["buildAccountInfoBody()\niterates spec.fields only"]
G -->|"❌ paymentRails missing\nfrom spec.fields"| H[Invalid API Request]
C --> I[Kotlin Sample\nExternalAccounts.kt]
D --> I
E --> I
I -->|"❌ paymentRails never\nread or set"| H
C --> J[Mintlify Docs\nexternal-accounts.mdx]
D --> J
J -->|"✅ paymentRails\nincluded correctly"| K[Valid API Request]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[INR Account Creation Request] --> B{Payment Rail?}
B -->|UPI| C["vpa required\npaymentRails: [UPI]"]
B -->|NEFT| D["accountNumber + ifsc + rail required\npaymentRails: [NEFT]"]
B -->|RTGS| E["accountNumber + ifsc + rail required\npaymentRails: [RTGS]"]
C --> F[Grid Visualizer\ncode-generator.ts]
D --> F
E --> F
F --> G["buildAccountInfoBody()\niterates spec.fields only"]
G -->|"❌ paymentRails missing\nfrom spec.fields"| H[Invalid API Request]
C --> I[Kotlin Sample\nExternalAccounts.kt]
D --> I
E --> I
I -->|"❌ paymentRails never\nread or set"| H
C --> J[Mintlify Docs\nexternal-accounts.mdx]
D --> J
J -->|"✅ paymentRails\nincluded correctly"| K[Valid API Request]
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
components/grid-visualizer/src/data/account-types.ts:54-64
**Missing required `paymentRails` field for INR_ACCOUNT**
`code-generator.ts`'s `buildAccountInfoBody` populates the request body exclusively by iterating over `spec.fields` (line 47–49). The OpenAPI schema (`InrAccountInfo`) marks `paymentRails` as a **required** field, but there is no `paymentRails` entry in the fields array here. Every INR account creation call emitted by the Grid Visualizer will therefore be missing that field and fail API validation. A `{ name: 'paymentRails', example: '["NEFT"]' }` entry (or equivalent special-casing in the code generator) is needed to produce a valid request body.
### Issue 2 of 2
samples/kotlin/src/main/kotlin/com/grid/sample/routes/ExternalAccounts.kt:116-129
**`paymentRails` never forwarded to the INR account builder**
The OpenAPI schema (`InrAccountInfo`) requires `paymentRails` (an array like `["NEFT"]` or `["UPI"]`). The `apply` block maps all five INR account-info fields, but never reads or sets `paymentRails`. Any INR account creation request routed through this sample will omit the required field and receive a validation error from the API. Both the UPI and NEFT/RTGS documentation examples explicitly include `"paymentRails"`, so the Kotlin path should read it from the incoming request body (e.g., `accountInfo.optList("paymentRails")`) and call the corresponding builder method.
Reviews (1): Last reviewed commit: "Docs: sync INR, GTQ, JMD account schemas..." | Re-trigger Greptile
| INR_ACCOUNT: { | ||
| accountType: 'INR_ACCOUNT', | ||
| fields: [ | ||
| { name: 'vpa', example: 'customer@okbank' }, | ||
| { name: 'vpa', example: 'customer@okbank', description: 'For UPI' }, | ||
| { name: 'accountNumber', example: '000111222333', description: 'For NEFT/RTGS' }, | ||
| { name: 'ifsc', example: 'HDFC0001234', description: 'For NEFT/RTGS' }, | ||
| { name: 'rail', example: 'NEFT', description: 'NEFT or RTGS' }, | ||
| { name: 'bankName', example: 'HDFC Bank', description: 'Optional' }, | ||
| ], | ||
| beneficiaryRequired: true, | ||
| }, |
There was a problem hiding this comment.
Missing required
paymentRails field for INR_ACCOUNT
code-generator.ts's buildAccountInfoBody populates the request body exclusively by iterating over spec.fields (line 47–49). The OpenAPI schema (InrAccountInfo) marks paymentRails as a required field, but there is no paymentRails entry in the fields array here. Every INR account creation call emitted by the Grid Visualizer will therefore be missing that field and fail API validation. A { name: 'paymentRails', example: '["NEFT"]' } entry (or equivalent special-casing in the code generator) is needed to produce a valid request body.
Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-visualizer/src/data/account-types.ts
Line: 54-64
Comment:
**Missing required `paymentRails` field for INR_ACCOUNT**
`code-generator.ts`'s `buildAccountInfoBody` populates the request body exclusively by iterating over `spec.fields` (line 47–49). The OpenAPI schema (`InrAccountInfo`) marks `paymentRails` as a **required** field, but there is no `paymentRails` entry in the fields array here. Every INR account creation call emitted by the Grid Visualizer will therefore be missing that field and fail API validation. A `{ name: 'paymentRails', example: '["NEFT"]' }` entry (or equivalent special-casing in the code generator) is needed to produce a valid request body.
How can I resolve this? If you propose a fix, please make it concise.| "INR_ACCOUNT" -> { | ||
| val info = InrExternalAccountCreateInfo.builder() | ||
| .accountType(InrExternalAccountCreateInfo.AccountType.INR_ACCOUNT) | ||
| .vpa(accountInfo.requireText("vpa")) | ||
| .beneficiary(buildInrBeneficiary(beneficiaryNode)) | ||
| .apply { | ||
| accountInfo.optText("vpa")?.let { vpa(it) } | ||
| accountInfo.optText("accountNumber")?.let { accountNumber(it) } | ||
| accountInfo.optText("ifsc")?.let { ifsc(it) } | ||
| accountInfo.optText("rail")?.let { rail(it) } | ||
| accountInfo.optText("bankName")?.let { bankName(it) } | ||
| } | ||
| .build() | ||
| ExternalAccountCreate.AccountInfo.ofInrAccount(info) | ||
| } |
There was a problem hiding this comment.
paymentRails never forwarded to the INR account builder
The OpenAPI schema (InrAccountInfo) requires paymentRails (an array like ["NEFT"] or ["UPI"]). The apply block maps all five INR account-info fields, but never reads or sets paymentRails. Any INR account creation request routed through this sample will omit the required field and receive a validation error from the API. Both the UPI and NEFT/RTGS documentation examples explicitly include "paymentRails", so the Kotlin path should read it from the incoming request body (e.g., accountInfo.optList("paymentRails")) and call the corresponding builder method.
Prompt To Fix With AI
This is a comment left during a code review.
Path: samples/kotlin/src/main/kotlin/com/grid/sample/routes/ExternalAccounts.kt
Line: 116-129
Comment:
**`paymentRails` never forwarded to the INR account builder**
The OpenAPI schema (`InrAccountInfo`) requires `paymentRails` (an array like `["NEFT"]` or `["UPI"]`). The `apply` block maps all five INR account-info fields, but never reads or sets `paymentRails`. Any INR account creation request routed through this sample will omit the required field and receive a validation error from the API. Both the UPI and NEFT/RTGS documentation examples explicitly include `"paymentRails"`, so the Kotlin path should read it from the incoming request body (e.g., `accountInfo.optList("paymentRails")`) and call the corresponding builder method.
How can I resolve this? If you propose a fix, please make it concise.
Summary
Following the account schema sync in d365c9c, this updates documentation, Kotlin sample, and Grid Visualizer to match the updated schemas.
INR_ACCOUNT (India)
accountNumber,ifsc,rail,bankNamefor bank transfersexternal-accounts.mdxwith NEFT/RTGS code examplescountry-support.mdxto list all three railsGTQ_ACCOUNT (Guatemala)
accountNumber,bankAccountType,bankNamephoneNumber(not in schema)JMD_ACCOUNT (Jamaica)
bankNamefield to Grid VisualizerTest plan
🤖 Generated with Claude Code