chore: Sync account schemas - #871
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
✱ Stainless preview builds for gridThis PR will update the cli go kotlin openapi php python ruby typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-typescript studio · code · diff
✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-go studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-python studio · code · diff
✅ grid-php studio · code · diff
✅ grid-cli studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThe PR synchronizes account schemas by adding ILS payment and external-account representations and updating several existing currency schemas. Two contract gaps leave the new ILS payment variant unsatisfiable and omit ILS from external-account creation, while the PHP schema also contains an INR-specific rail example.
Confidence Score: 3/5The PR should not merge until ILS payment instructions are made satisfiable and ILS external-account creation is either represented or explicitly removed from the advertised contract. The new payment schema requires accountType to be both ILS_ACCOUNT and a member of an enum that excludes it, while the external-account contract advertises ILS only on response paths and leaves every creation endpoint unable to represent it. Files Needing Attention: openapi/components/schemas/common/PaymentIlsAccountInfo.yaml, openapi/components/schemas/common/PaymentAccountType.yaml, openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml, and the external-account create schemas
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/PaymentIlsAccountInfo.yaml | Adds an ILS payment variant whose allOf branches impose mutually incompatible accountType enums. |
| openapi/components/schemas/common/PaymentInstructions.yaml | Advertises ILS_ACCOUNT through oneOf and discriminator mappings despite the selected schema having no valid instance. |
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Adds ILS to response schemas without adding the corresponding type to the create union used by three endpoint families. |
| openapi/components/schemas/common/PhpAccountInfoBase.yaml | Adds an optional rail field but copies INR-specific NEFT/RTGS guidance into the PHP schema. |
| openapi.yaml | Correctly reflects the modular changes but propagates the ILS contract contradictions and misleading PHP example. |
| mintlify/openapi.yaml | Remains synchronized with the root bundle and exposes the same issues in generated documentation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
ILS[ILS_ACCOUNT payload] --> PI[PaymentInstructions]
PI --> PIA[PaymentIlsAccountInfo]
PIA --> BPA[BasePaymentAccountInfo]
PIA --> IA[IlsAccountInfo]
BPA --> PAT[PaymentAccountType without ILS_ACCOUNT]
IA --> IAT[accountType must equal ILS_ACCOUNT]
PAT --> Invalid[Unsatisfiable payment schema]
IAT --> Invalid
ILS --> Create[External-account create endpoints]
Create --> CreateUnion[ExternalAccountCreateInfoOneOf]
CreateUnion --> Missing[No ILS create variant]
ILS --> Read[External-account responses]
Read --> InfoUnion[ExternalAccountInfoOneOf includes ILS]
Prompt To Fix All With AI
### Issue 1
openapi/components/schemas/common/PaymentIlsAccountInfo.yaml:2-4
**ILS payment schema is unsatisfiable**
When a payment instruction uses `accountType: ILS_ACCOUNT`, this `allOf` requires the value to satisfy both `IlsAccountInfo` and `BasePaymentAccountInfo`, whose `PaymentAccountType` enum excludes `ILS_ACCOUNT`, causing validators and generated clients to reject every ILS payment instruction.
### Issue 2
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml:48
**ILS creation variant is missing**
When a customer, platform, or agent attempts to create an ILS external account advertised by this response union and `ExternalAccountType`, the create endpoints still use `ExternalAccountCreateInfoOneOf`, which has no ILS variant or discriminator mapping, causing generated clients and schema validators to reject the creation payload.
### Issue 3
openapi/components/schemas/common/PhpAccountInfoBase.yaml:11-17
**PHP example uses INR rail**
The new PHP field description and example use NEFT and RTGS, which belong to the INR schema while PHP exposes only `BANK_TRANSFER`; publishing this example directs consumers to construct PHP account payloads with an unsupported rail.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./IlsAccountInfo.yaml |
There was a problem hiding this comment.
ILS payment schema is unsatisfiable
When a payment instruction uses accountType: ILS_ACCOUNT, this allOf requires the value to satisfy both IlsAccountInfo and BasePaymentAccountInfo, whose PaymentAccountType enum excludes ILS_ACCOUNT, causing validators and generated clients to reject every ILS payment instruction.
Knowledge Base Used: Contract validation workflows
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/PaymentIlsAccountInfo.yaml
Line: 2-4
Comment:
**ILS payment schema is unsatisfiable**
When a payment instruction uses `accountType: ILS_ACCOUNT`, this `allOf` requires the value to satisfy both `IlsAccountInfo` and `BasePaymentAccountInfo`, whose `PaymentAccountType` enum excludes `ILS_ACCOUNT`, causing validators and generated clients to reject every ILS payment instruction.
**Knowledge Base Used:** [Contract validation workflows](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/contract-validation-workflows.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| - $ref: ./SparkWalletExternalAccountInfo.yaml | ||
| - $ref: ./TronWalletExternalAccountInfo.yaml | ||
| - $ref: ./CnyExternalAccountInfo.yaml | ||
| - $ref: ./IlsExternalAccountInfo.yaml |
There was a problem hiding this comment.
ILS creation variant is missing
When a customer, platform, or agent attempts to create an ILS external account advertised by this response union and ExternalAccountType, the create endpoints still use ExternalAccountCreateInfoOneOf, which has no ILS variant or discriminator mapping, causing generated clients and schema validators to reject the creation payload.
Knowledge Base Used: Grid API contract
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 48
Comment:
**ILS creation variant is missing**
When a customer, platform, or agent attempts to create an ILS external account advertised by this response union and `ExternalAccountType`, the create endpoints still use `ExternalAccountCreateInfoOneOf`, which has no ILS variant or discriminator mapping, causing generated clients and schema validators to reject the creation payload.
**Knowledge Base Used:** [Grid API contract](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/api-contract.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| 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.
The new PHP field description and example use NEFT and RTGS, which belong to the INR schema while PHP exposes only BANK_TRANSFER; publishing this example directs consumers to construct PHP account payloads with an unsupported rail.
Knowledge Base Used: Grid API contract
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/PhpAccountInfoBase.yaml
Line: 11-17
Comment:
**PHP example uses INR rail**
The new PHP field description and example use NEFT and RTGS, which belong to the INR schema while PHP exposes only `BANK_TRANSFER`; publishing this example directs consumers to construct PHP account payloads with an unsupported rail.
**Knowledge Base Used:** [Grid API contract](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/api-contract.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Superseded by #876 |
Auto-synced account schemas.
These schemas are generated from VASP adapter field definitions in sparkcore.
Synced schemas:
common/— per-currency account info, beneficiary, and payment account schemascommon/PaymentInstructions.yaml— payment instructions oneOf (new currencies added)external_accounts/— per-currency external account schemas (reference common/)Please review the changes before merging.