Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR auto-syncs account schemas generated from VASP adapter field definitions in sparkcore, adding support for 8 new currencies (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) across
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Updated to add 8 new currency oneOf entries and discriminator mappings; contains a spurious LIGHTNING_ACCOUNT duplicate discriminator entry not backed by any oneOf reference. |
| openapi/components/schemas/common/PaymentInstructions.yaml | Correctly adds 8 new currency account infos (BDT, COP, EGP, GHS, GTQ, HTG, JMD, PKR) to both the oneOf list and discriminator mapping; no issues found. |
| openapi/components/schemas/common/UsdBeneficiary.yaml | Removes birthDate and nationality from required fields, aligning USD beneficiary with the other currency beneficiary schemas that only require beneficiaryType and fullName. |
| openapi/components/schemas/common/UsdAccountInfo.yaml | Adds BANK_TRANSFER as a new valid payment rail enum value for USD accounts; consistent with other account schemas. |
| openapi/components/schemas/common/BdtAccountInfo.yaml | New BDT account schema with accountNumber, branchCode, phoneNumber required; supports BANK_TRANSFER and MOBILE_MONEY rails; well-structured. |
| openapi/components/schemas/common/EgpAccountInfo.yaml | New EGP account schema; the optional iban field uses a German IBAN example (DE prefix) which is misleading for Egyptian accounts. |
| openapi/components/schemas/common/PkrAccountInfo.yaml | New PKR account schema; the optional iban field also uses a German IBAN example (DE prefix) which is misleading for Pakistani accounts. |
| openapi/components/schemas/external_accounts/BdtExternalAccountInfo.yaml | New BDT external account schema following established allOf pattern with BaseExternalAccountInfo, BdtAccountInfo, and beneficiary discriminator; looks correct. |
| openapi/components/schemas/common/HtgAccountInfo.yaml | New HTG (Haitian Gourde) account schema; notably only supports MOBILE_MONEY rail (no BANK_TRANSFER) and does not require accountNumber, reflecting the mobile-money-only nature of HTG transfers. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
PI[PaymentInstructions.yaml\noneOf / discriminator] --> PBDT[PaymentBdtAccountInfo]
PI --> PCOP[PaymentCopAccountInfo]
PI --> PEGP[PaymentEgpAccountInfo]
PI --> PGHS[PaymentGhsAccountInfo]
PI --> PGTQ[PaymentGtqAccountInfo]
PI --> PHTG[PaymentHtgAccountInfo]
PI --> PJMD[PaymentJmdAccountInfo]
PI --> PPKR[PaymentPkrAccountInfo]
PBDT --> BASE[BasePaymentAccountInfo] & BDT[BdtAccountInfo]
PCOP --> BASE & COP[CopAccountInfo]
PEGP --> BASE & EGP[EgpAccountInfo]
PGHS --> BASE & GHS[GhsAccountInfo]
PGTQ --> BASE & GTQ[GtqAccountInfo]
PHTG --> BASE & HTG[HtgAccountInfo]
PJMD --> BASE & JMD[JmdAccountInfo]
PPKR --> BASE & PKR[PkrAccountInfo]
EXT[ExternalAccountInfoOneOf.yaml\noneOf / discriminator] --> EBDT[BdtExternalAccountInfo]
EXT --> ECOP[CopExternalAccountInfo]
EXT --> EEGP[EgpExternalAccountInfo]
EXT --> EGHS[GhsExternalAccountInfo]
EXT --> EGTQ[GtqExternalAccountInfo]
EXT --> EHTG[HtgExternalAccountInfo]
EXT --> EJMD[JmdExternalAccountInfo]
EXT --> EPKR[PkrExternalAccountInfo]
EBDT --> BASEXT[BaseExternalAccountInfo] & BDT
ECOP --> BASEXT & COP
EEGP --> BASEXT & EGP
EGHS --> BASEXT & GHS
EGTQ --> BASEXT & GTQ
EHTG --> BASEXT & HTG
EJMD --> BASEXT & JMD
EPKR --> BASEXT & PKR
EBDT -->|beneficiary oneOf| BDTBEN[BdtBeneficiary / BusinessBeneficiary]
ECOP -->|beneficiary oneOf| COPBEN[CopBeneficiary / BusinessBeneficiary]
style EXT fill:#ffd6d6,stroke:#c00
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 88
Comment:
**Spurious `LIGHTNING_ACCOUNT` discriminator entry**
This PR adds `LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml` to the discriminator mapping, but:
1. There is no corresponding `oneOf` entry added for `LIGHTNING_ACCOUNT` in this PR (or in the original file).
2. `LIGHTNING` is already present as a discriminator mapping key pointing to the same file (`./LightningExternalAccountInfo.yaml`) at line 72 of the current file.
This creates a duplicate/orphaned discriminator entry that does not correspond to any `accountType` enum value (which is `LIGHTNING`, not `LIGHTNING_ACCOUNT`) and is not backed by a `oneOf` schema reference. It may cause unexpected behavior for OpenAPI tooling that validates discriminator consistency.
```suggestion
JMD_ACCOUNT: ./JmdExternalAccountInfo.yaml
PKR_ACCOUNT: ./PkrExternalAccountInfo.yaml
```
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/EgpAccountInfo.yaml
Line: 20
Comment:
**German IBAN example for Egyptian account schema**
The `iban` field example `DE89370400440532013000` is a German IBAN (prefix `DE`). For an Egyptian Pound (EGP) account, this example should use an Egyptian IBAN (prefix `EG`). While this is just an example and the `pattern` correctly validates any country's IBAN format, it may confuse API consumers integrating with EGP payment flows.
The same issue appears in `PkrAccountInfo.yaml` line 17, which also uses the German IBAN example despite being a Pakistani Rupee (PKR) account schema (Pakistan IBANs use `PK` prefix).
```suggestion
example: EG800002000156789012345180002
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile
| GTQ_ACCOUNT: ./GtqExternalAccountInfo.yaml | ||
| HTG_ACCOUNT: ./HtgExternalAccountInfo.yaml | ||
| JMD_ACCOUNT: ./JmdExternalAccountInfo.yaml | ||
| LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml |
There was a problem hiding this comment.
Spurious
LIGHTNING_ACCOUNT discriminator entry
This PR adds LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml to the discriminator mapping, but:
- There is no corresponding
oneOfentry added forLIGHTNING_ACCOUNTin this PR (or in the original file). LIGHTNINGis already present as a discriminator mapping key pointing to the same file (./LightningExternalAccountInfo.yaml) at line 72 of the current file.
This creates a duplicate/orphaned discriminator entry that does not correspond to any accountType enum value (which is LIGHTNING, not LIGHTNING_ACCOUNT) and is not backed by a oneOf schema reference. It may cause unexpected behavior for OpenAPI tooling that validates discriminator consistency.
| LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml | |
| JMD_ACCOUNT: ./JmdExternalAccountInfo.yaml | |
| PKR_ACCOUNT: ./PkrExternalAccountInfo.yaml |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 88
Comment:
**Spurious `LIGHTNING_ACCOUNT` discriminator entry**
This PR adds `LIGHTNING_ACCOUNT: ./LightningExternalAccountInfo.yaml` to the discriminator mapping, but:
1. There is no corresponding `oneOf` entry added for `LIGHTNING_ACCOUNT` in this PR (or in the original file).
2. `LIGHTNING` is already present as a discriminator mapping key pointing to the same file (`./LightningExternalAccountInfo.yaml`) at line 72 of the current file.
This creates a duplicate/orphaned discriminator entry that does not correspond to any `accountType` enum value (which is `LIGHTNING`, not `LIGHTNING_ACCOUNT`) and is not backed by a `oneOf` schema reference. It may cause unexpected behavior for OpenAPI tooling that validates discriminator consistency.
```suggestion
JMD_ACCOUNT: ./JmdExternalAccountInfo.yaml
PKR_ACCOUNT: ./PkrExternalAccountInfo.yaml
```
How can I resolve this? If you propose a fix, please make it concise.| accountNumber: | ||
| type: string | ||
| description: The account number of the bank | ||
| minLength: 1 |
There was a problem hiding this comment.
German IBAN example for Egyptian account schema
The iban field example DE89370400440532013000 is a German IBAN (prefix DE). For an Egyptian Pound (EGP) account, this example should use an Egyptian IBAN (prefix EG). While this is just an example and the pattern correctly validates any country's IBAN format, it may confuse API consumers integrating with EGP payment flows.
The same issue appears in PkrAccountInfo.yaml line 17, which also uses the German IBAN example despite being a Pakistani Rupee (PKR) account schema (Pakistan IBANs use PK prefix).
| minLength: 1 | |
| example: EG800002000156789012345180002 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/EgpAccountInfo.yaml
Line: 20
Comment:
**German IBAN example for Egyptian account schema**
The `iban` field example `DE89370400440532013000` is a German IBAN (prefix `DE`). For an Egyptian Pound (EGP) account, this example should use an Egyptian IBAN (prefix `EG`). While this is just an example and the `pattern` correctly validates any country's IBAN format, it may confuse API consumers integrating with EGP payment flows.
The same issue appears in `PkrAccountInfo.yaml` line 17, which also uses the German IBAN example despite being a Pakistani Rupee (PKR) account schema (Pakistan IBANs use `PK` prefix).
```suggestion
example: EG800002000156789012345180002
```
How can I resolve this? If you propose a fix, please make it concise.
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.