Skip to content

Revert "chore: Sync account schemas" - #395

Merged
shreyav merged 1 commit into
mainfrom
revert-388-auto/sync-grid-schemas-20260423-220919
Apr 24, 2026
Merged

Revert "chore: Sync account schemas"#395
shreyav merged 1 commit into
mainfrom
revert-388-auto/sync-grid-schemas-20260423-220919

Conversation

@shreyav

@shreyav shreyav commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Reverts #388

@vercel

vercel Bot commented Apr 24, 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 Apr 24, 2026 8:31pm

Request Review

@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(types): add phoneNumber/bankAccountType, remove bankName, update beneficiary fields

openapi

feat(api): add bankAccountType/phoneNumber fields, payment methods to USD/COP/GTQ, update types

python

fix(types): update beneficiary optionality, remove bank_name, add phone_number across currencies

typescript

feat(api): update external account types for USD/COP/GTQ/BDT/EGP/GHS/JMD/PKR
⚠️ grid-openapi studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗

⚠️ grid-python studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/14b6b8b76b99eead85d84abf1d886aa7fffd3f5c/grid-0.0.1-py3-none-any.whl
⚠️ grid-kotlin studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗build ✅lint ✅test ✅

⚠️ grid-typescript studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/245d2a76ec85b3dd7c6be9b1360c2068c8bc8c64/dist.tar.gz

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-04-24 20:41:33 UTC

@greptile-apps

greptile-apps Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reverts #388 ("chore: Sync account schemas"), restoring previous account info schemas across 42 files. The bulk of changes are removing example blocks from ~30 AccountInfoBase schemas and reverting field-level adjustments in COP, GTQ, USD, BDT, EGP, GHS, JMD, and PKR schemas.

  • CopAccountInfoBase: bankName is restored as a required field but without minLength/maxLength constraints — the pre-chore: Sync account schemas #388 version lacked these guards, meaning an empty string \"\" passes schema validation for a required field.
  • UsdAccountInfoBase: bankAccountType is reintroduced as optional while its description says "Required for certain corridors (e.g., El Salvador)" — a mismatch between documentation intent and schema enforcement.

Confidence Score: 4/5

Safe to merge with a minor fix: bankName in CopAccountInfoBase should have minLength: 1 to prevent empty-string submissions on a required field.

One P1 finding: the required bankName field in CopAccountInfoBase has no minLength constraint, allowing empty strings past schema validation. The rest of the changes (example block removals, beneficiary required-field relaxations, new MOBILE_MONEY/BANK_TRANSFER enum values) are clean. The bankAccountType documentation note in UsdAccountInfoBase is a P2 concern only.

openapi/components/schemas/common/CopAccountInfoBase.yaml — required bankName field missing minLength constraint.

Important Files Changed

Filename Overview
openapi/components/schemas/common/CopAccountInfoBase.yaml Reverts bankName to required-but-unconstrained (no minLength/maxLength), adds required phoneNumber, adds MOBILE_MONEY payment method — bankName allows empty strings.
openapi/components/schemas/common/UsdAccountInfoBase.yaml Adds optional bankAccountType (described as corridor-conditionally required) and removes the example block; conditional requirement not enforced by schema.
openapi/components/schemas/common/GtqAccountInfoBase.yaml Reverts to phoneNumber-only account schema, removing bankName and bankAccountType entirely from properties and required list.
openapi/components/schemas/common/UsdBeneficiary.yaml Removes address, birthDate, and nationality from required fields — backward compatible relaxation.
openapi/components/schemas/common/CopBeneficiary.yaml Swaps required fields: documentNumber and documentType removed; countryOfResidence becomes required.
openapi/components/schemas/common/GtqBeneficiary.yaml phoneNumber removed from required fields — backward compatible relaxation.
openapi/components/schemas/common/CopAccountInfo.yaml Adds MOBILE_MONEY as a valid payment method enum value alongside BANK_TRANSFER.
openapi/components/schemas/common/GtqAccountInfo.yaml Adds MOBILE_MONEY as a valid payment method enum value alongside BANK_TRANSFER.
openapi/components/schemas/common/UsdAccountInfo.yaml Adds BANK_TRANSFER as a valid payment method enum value alongside ACH, WIRE, RTP, FEDNOW.
openapi/components/schemas/common/AedAccountInfoBase.yaml Example block removed; no structural changes.
openapi/components/schemas/common/BdtAccountInfoBase.yaml bankName removed from required list and properties, example block removed.
openapi/components/schemas/common/EgpAccountInfoBase.yaml bankName removed from required list and properties, example block removed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Account Info Request] --> B{Currency / Corridor}
    B -->|COP| C[CopAccountInfoBase\nrequired: accountType, accountNumber,\nbankAccountType, bankName, phoneNumber]
    B -->|GTQ| D[GtqAccountInfoBase\nrequired: accountType, accountNumber, phoneNumber]
    B -->|USD| E[UsdAccountInfoBase\nrequired: accountType, accountNumber, routingNumber\noptional: bankAccountType ⚠️ required for El Salvador]
    B -->|Other| F[Currency-specific schema\nexamples removed]
    C --> G{Payment type}
    D --> G
    G -->|BANK_TRANSFER| H[Bank Transfer flow]
    G -->|MOBILE_MONEY| I[Mobile Money flow ✨ new enum]
    E --> J{Payment type}
    J -->|ACH / WIRE / RTP / FEDNOW| K[Existing US rails]
    J -->|BANK_TRANSFER| L[Bank Transfer ✨ new enum]
Loading

Fix All in Claude Code

Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CopAccountInfoBase.yaml
Line: 24-26

Comment:
**`bankName` required but lacks length constraints**

`bankName` is listed as required but has no `minLength` or `maxLength` constraints, meaning an empty string `""` would pass schema validation. The schema removed from PR #388 had `minLength: 1, maxLength: 255` on this field. Without `minLength: 1`, a caller can submit an empty bank name and the spec won't reject it.

```suggestion
  bankName:
    type: string
    description: The name of the bank
    minLength: 1
    maxLength: 255
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfoBase.yaml
Line: 23-28

Comment:
**`bankAccountType` described as conditionally required but not enforced by schema**

The description says "Required for certain corridors (e.g., El Salvador)" yet the field is absent from the `required` array, so the schema won't reject requests that omit it for those corridors. This is a documentation/validation mismatch that could cause silent failures server-side for El Salvador payments. Consider either adding conditional validation (`if`/`then`) or at minimum documenting server-side enforcement so consumers don't rely on the spec for correctness.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Revert "chore: Sync account schemas (#38..." | Re-trigger Greptile

Comment on lines +24 to +26
bankName:
type: string
description: The name of the bank

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 bankName required but lacks length constraints

bankName is listed as required but has no minLength or maxLength constraints, meaning an empty string "" would pass schema validation. The schema removed from PR #388 had minLength: 1, maxLength: 255 on this field. Without minLength: 1, a caller can submit an empty bank name and the spec won't reject it.

Suggested change
bankName:
type: string
description: The name of the bank
bankName:
type: string
description: The name of the bank
minLength: 1
maxLength: 255
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CopAccountInfoBase.yaml
Line: 24-26

Comment:
**`bankName` required but lacks length constraints**

`bankName` is listed as required but has no `minLength` or `maxLength` constraints, meaning an empty string `""` would pass schema validation. The schema removed from PR #388 had `minLength: 1, maxLength: 255` on this field. Without `minLength: 1`, a caller can submit an empty bank name and the spec won't reject it.

```suggestion
  bankName:
    type: string
    description: The name of the bank
    minLength: 1
    maxLength: 255
```

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

Comment on lines +23 to +28
bankAccountType:
type: string
description: The bank account type. Required for certain corridors (e.g., El Salvador).
enum:
- CHECKING
- SAVINGS

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.

P2 bankAccountType described as conditionally required but not enforced by schema

The description says "Required for certain corridors (e.g., El Salvador)" yet the field is absent from the required array, so the schema won't reject requests that omit it for those corridors. This is a documentation/validation mismatch that could cause silent failures server-side for El Salvador payments. Consider either adding conditional validation (if/then) or at minimum documenting server-side enforcement so consumers don't rely on the spec for correctness.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfoBase.yaml
Line: 23-28

Comment:
**`bankAccountType` described as conditionally required but not enforced by schema**

The description says "Required for certain corridors (e.g., El Salvador)" yet the field is absent from the `required` array, so the schema won't reject requests that omit it for those corridors. This is a documentation/validation mismatch that could cause silent failures server-side for El Salvador payments. Consider either adding conditional validation (`if`/`then`) or at minimum documenting server-side enforcement so consumers don't rely on the spec for correctness.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

@shreyav
shreyav merged commit c302e52 into main Apr 24, 2026
6 of 7 checks passed
@shreyav
shreyav deleted the revert-388-auto/sync-grid-schemas-20260423-220919 branch April 24, 2026 20:34
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.

2 participants