Skip to content

Docs: sync INR, GTQ, JMD account schemas with OpenAPI#661

Open
claude[bot] wants to merge 1 commit into
mainfrom
docs/sync-20260707
Open

Docs: sync INR, GTQ, JMD account schemas with OpenAPI#661
claude[bot] wants to merge 1 commit into
mainfrom
docs/sync-20260707

Conversation

@claude

@claude claude Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Following the account schema sync in d365c9c, this updates documentation, Kotlin sample, and Grid Visualizer to match the updated schemas.

INR_ACCOUNT (India)

  • Now supports NEFT and RTGS payment rails in addition to UPI
  • Added fields: accountNumber, ifsc, rail, bankName for bank transfers
  • Updated external-accounts.mdx with NEFT/RTGS code examples
  • Updated country-support.mdx to list all three rails
  • Updated Kotlin sample to handle optional fields based on rail selection

GTQ_ACCOUNT (Guatemala)

  • Fixed Grid Visualizer fields to match schema: accountNumber, bankAccountType, bankName
  • Removed phoneNumber (not in schema)

JMD_ACCOUNT (Jamaica)

  • Added missing required bankName field to Grid Visualizer

Test plan

  • Verify Mintlify docs render correctly with new India examples
  • Verify Grid Visualizer generates correct API calls for INR, GTQ, JMD
  • Verify Kotlin sample compiles and handles INR account creation

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Jul 7, 2026 9:14am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
grid-wallet-demo Ignored Ignored Jul 7, 2026 9:14am

Request Review

@mintlify

mintlify Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Jul 7, 2026, 9:20 AM

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

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

  • INR_ACCOUNT: external-accounts.mdx correctly documents both UPI and NEFT/RTGS rails with complete, spec-accurate curl examples (including the required paymentRails field); country-support.mdx is updated to list all three rails; currencies.ts adds NEFT/RTGS to allRails.
  • Grid Visualizer (account-types.ts): Adds the new INR fields (accountNumber, ifsc, rail, bankName) and fixes GTQ/JMD fields, but omits paymentRails from the INR spec — the code generator derives the full request body from spec.fields only, so all INR calls it emits will be missing this required field.
  • Kotlin sample: Converts INR field mapping to an optional apply block for multi-rail support, but never reads or forwards paymentRails to the SDK builder, causing the same missing-required-field failure for any INR account creation routed through the sample.

Confidence Score: 3/5

The documentation curl examples are correct, but both the Grid Visualizer and Kotlin sample will emit invalid INR account creation requests because the required paymentRails field is never populated in either path.

The Mintlify docs changes are accurate and safe. The GTQ and JMD visualizer fixes look correct. However, the INR changes in two separate artifacts — account-types.ts for the Grid Visualizer and ExternalAccounts.kt for the Kotlin sample — both omit paymentRails, which the OpenAPI schema (InrAccountInfo) marks as required. Any developer running the Kotlin sample or using the Grid Visualizer to generate an INR account payload will get an API validation failure on every attempt.

components/grid-visualizer/src/data/account-types.ts and samples/kotlin/src/main/kotlin/com/grid/sample/routes/ExternalAccounts.kt both need paymentRails added to their INR handling before these paths produce valid API calls.

Important Files Changed

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]
Loading
%%{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]
Loading
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

Comment on lines 54 to 64
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,
},

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

Comment on lines 116 to 129
"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)
}

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

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.

0 participants