Add INR bank (NEFT/RTGS) fields to the INR account schema#646
Add INR bank (NEFT/RTGS) fields to the INR account schema#646mohamedwane wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJZdGCz7aSRNSHcBEdweyD
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
✱ 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-cli studio · code · diff
✅ grid-openapi studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-go studio · code · diff
|
Greptile SummaryThis PR extends
Confidence Score: 5/5Safe to merge — purely additive schema change with no breaking modifications to existing fields or required sets. All changes are additive: new properties are optional, the existing accountType required constraint is preserved, IFSC and account-number patterns are correct, and all three copies of the spec (source component YAML, openapi.yaml, mintlify/openapi.yaml) are kept in sync. No logic, routing, or persistence is touched in this PR. No files require special attention. The only nit is the merged example in InrAccountInfoBase.yaml combining UPI and NEFT fields, which could be split into named examples for clarity.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/InrAccountInfoBase.yaml | Removes vpa from required, adds description of rail-dependent validation, and introduces accountNumber, ifsc, rail, and bankName properties with appropriate patterns/constraints. Example mixes UPI and NEFT fields together. |
| openapi/components/schemas/common/InrAccountInfo.yaml | Adds NEFT and RTGS to the paymentRails enum; clean, minimal, and consistent with the base schema changes. |
| openapi.yaml | Compiled/flattened copy reflecting the same InrAccountInfoBase and InrAccountInfo changes; stays in sync with source component files. |
| mintlify/openapi.yaml | Mintlify docs copy with identical INR schema additions; consistent with openapi.yaml. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[INR Account Create Request] --> B{accountType: INR_ACCOUNT}
B --> C{rail?}
C -->|NEFT / RTGS| D[Required: accountNumber + ifsc + rail]
C -->|UPI| E[Required: vpa]
C -->|absent / other| F[Server-side validation rejects]
D --> G[Optional: bankName]
E --> H[paymentRails enum: UPI / NEFT / RTGS]
G --> H
%%{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 Create Request] --> B{accountType: INR_ACCOUNT}
B --> C{rail?}
C -->|NEFT / RTGS| D[Required: accountNumber + ifsc + rail]
C -->|UPI| E[Required: vpa]
C -->|absent / other| F[Server-side validation rejects]
D --> G[Optional: bankName]
E --> H[paymentRails enum: UPI / NEFT / RTGS]
G --> H
Reviews (2): Last reviewed commit: "Add INR bank (NEFT/RTGS) fields to the I..." | Re-trigger Greptile
| required: | ||
| - accountType | ||
| - vpa | ||
| description: 'Required fields depend on the selected paymentRails: | ||
|
|
||
| - NEFT: accountNumber, ifsc, rail | ||
|
|
||
| - RTGS: accountNumber, ifsc, rail | ||
|
|
||
| - UPI: vpa' |
There was a problem hiding this comment.
Conditional Fields Stay Optional
When an INR external account create request uses this base schema, only accountType is required. A payload with accountType: INR_ACCOUNT and missing vpa, or with partial bank details such as accountNumber without ifsc and rail, can pass schema validation even though no supported INR rail has enough destination data to route a payout.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/InrAccountInfoBase.yaml
Line: 2-10
Comment:
**Conditional Fields Stay Optional**
When an INR external account create request uses this base schema, only `accountType` is required. A payload with `accountType: INR_ACCOUNT` and missing `vpa`, or with partial bank details such as `accountNumber` without `ifsc` and `rail`, can pass schema validation even though no supported INR rail has enough destination data to route a payout.
How can I resolve this? If you propose a fix, please make it concise.| rail: | ||
| type: string | ||
| description: The payment rail to route the payout over, for currencies that support | ||
| more than one (e.g. NEFT or RTGS for INR). | ||
| example: NEFT | ||
| minLength: 1 | ||
| maxLength: 32 |
There was a problem hiding this comment.
Rail Accepts Unsupported Values
The create-time rail selector is a free-form string while the INR response schema only advertises UPI, NEFT, and RTGS. A create payload with rail: "IMPS" or rail: "NEFTT" can pass OpenAPI validation and leave the account with a routing value that downstream payout logic cannot match to a supported INR rail.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/InrAccountInfoBase.yaml
Line: 38-44
Comment:
**Rail Accepts Unsupported Values**
The create-time `rail` selector is a free-form string while the INR response schema only advertises `UPI`, `NEFT`, and `RTGS`. A create payload with `rail: "IMPS"` or `rail: "NEFTT"` can pass OpenAPI validation and leave the account with a routing value that downstream payout logic cannot match to a supported INR rail.
How can I resolve this? If you propose a fix, please make it concise.|
Re: the two Greptile findings — both are intentional in this PR:
Generated by Claude Code |
|
Status of the failing The likely fix is Stainless-side (codegen/config) rather than a spec change — the schema intentionally mirrors sparkcore's generated Generated by Claude Code |
|
@greptileai please re-review — the two earlier findings (rail-conditional required fields expressed as description text, and Generated by Claude Code |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Why the
|
| Test | csharp |
|---|---|
| This PR's full change (2 runs) | ❌ |
Full change minus rail property |
❌ |
Only NEFT/RTGS enum values (2-line diff; same shape as EUR's SEPA, SEPA_INSTANT) |
❌ |
info.description one-word tweak (no generated-code delta → cached build) |
✅ |
GTQ bankName description-only change (doc-comment-only codegen delta) |
❌ |
Conclusion: any grid-api change that regenerates csharp code currently fails Stainless's csharp build CI, content-independent. The window opened between Jul 3 09:10 UTC (#642 passed with a codegen delta) and Jul 6 18:34 UTC (#644, same failure). Auto-sync #644 is red for the same reason.
The csharp target is unpublished (production_repo: null, publish.nuget: false), so nothing shipping is affected. All real spec gates here (Lint, Breaking Changes, OpenAPI docs build) are green. Precedent: #633 and #637 merged through this same red check.
The underlying csharp error is only visible in Stainless Studio (org lightspark, project grid) — needs someone with access there, or Stainless support.
|
This PR is now superseded by #644 ("chore: Sync account schemas"), which merged to main with the identical INR schema content: Recommend closing as superseded. The follow-ups from the description (regenerate the sparkcore grid-api client via Generated by Claude Code |
INR external accounts were UPI-only (
vpa). This adds the bank-rail fields so a NEFT/RTGS beneficiary can be represented:InrAccountInfoBasegainsaccountNumber,ifsc,rail,bankName(accountTypeis the only unconditional required field; required set is rail-dependent — NEFT/RTGS need accountNumber + ifsc + rail, UPI needs vpa), andInrAccountInfoallowsNEFT/RTGSinpaymentRails. Mirrors the shape sparkcore already generates inscripts/grid/generated_common/InrAccountInfoBase.yamlfor the M2 non-instant INR corridor.Follow-ups (not in this PR): regenerate the sparkcore grid-api client from this spec (
grid-api/update_schema.sh), then wire the sparkcore server side to persist/serialize the bank fields indestination_details.🤖 Generated with Claude Code
https://claude.ai/code/session_01VJZdGCz7aSRNSHcBEdweyD
Generated by Claude Code