Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript
|
Greptile SummaryThis PR adds an optional Key observations:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/quotes/AccountDestination.yaml | Adds optional paymentRail string field to the AccountDestination schema; the field lacks an enum constraint, which limits discoverability of valid values from the spec. |
| openapi.yaml | Bundled output of make build — mirrors the source change in AccountDestination.yaml; same enum concern applies. |
| mintlify/openapi.yaml | Mintlify-specific bundled output — identical change to openapi.yaml; generated artifact from make build. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Quote Request with AccountDestination] --> B{paymentRail specified?}
B -- Yes --> C[Validate rail against destination account's supported rails]
C --> D{Rail supported?}
D -- Yes --> E[Create Quote with specified paymentRail]
D -- No --> F[Error: Unsupported payment rail]
B -- No --> G[System selects default rail for destination account]
G --> E
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/quotes/AccountDestination.yaml
Line: 17-23
Comment:
**No enum constraint on `paymentRail`**
The `paymentRail` field is defined as a free-form `type: string`, but the valid values are well-defined enums in the existing account info schemas. For example, `UsdAccountInfo.yaml` defines `paymentRails` items as an enum: `ACH`, `WIRE`, `RTP`, `FEDNOW`.
Without an enum constraint (or a `$ref` to a shared `PaymentRail` schema), API clients have no way to discover valid values from the spec alone, and invalid values will only be caught at runtime. Consider either:
1. Adding an enum with the superset of all supported rails (e.g., `ACH`, `WIRE`, `RTP`, `FEDNOW`, plus any non-USD rails), or
2. Extracting a shared `PaymentRail` schema and using `$ref` here — the same way `paymentRails` items in each `*AccountInfo.yaml` could reference it.
```suggestion
paymentRail:
type: string
enum:
- ACH
- WIRE
- RTP
- FEDNOW
description: >-
The payment rail to use for the transfer. Must be one of the rails
supported by the destination account. If not specified, the system
will select a default rail.
example: ACH
```
(Adjust the enum values to match all rails supported across all destination account types.)
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "feat: adding payment..."
| paymentRail: | ||
| type: string | ||
| description: >- | ||
| The payment rail to use for the transfer. Must be one of the rails | ||
| supported by the destination account. If not specified, the system | ||
| will select a default rail. | ||
| example: ACH |
There was a problem hiding this comment.
No enum constraint on
paymentRail
The paymentRail field is defined as a free-form type: string, but the valid values are well-defined enums in the existing account info schemas. For example, UsdAccountInfo.yaml defines paymentRails items as an enum: ACH, WIRE, RTP, FEDNOW.
Without an enum constraint (or a $ref to a shared PaymentRail schema), API clients have no way to discover valid values from the spec alone, and invalid values will only be caught at runtime. Consider either:
- Adding an enum with the superset of all supported rails (e.g.,
ACH,WIRE,RTP,FEDNOW, plus any non-USD rails), or - Extracting a shared
PaymentRailschema and using$refhere — the same waypaymentRailsitems in each*AccountInfo.yamlcould reference it.
| paymentRail: | |
| type: string | |
| description: >- | |
| The payment rail to use for the transfer. Must be one of the rails | |
| supported by the destination account. If not specified, the system | |
| will select a default rail. | |
| example: ACH | |
| paymentRail: | |
| type: string | |
| enum: | |
| - ACH | |
| - WIRE | |
| - RTP | |
| - FEDNOW | |
| description: >- | |
| The payment rail to use for the transfer. Must be one of the rails | |
| supported by the destination account. If not specified, the system | |
| will select a default rail. | |
| example: ACH |
(Adjust the enum values to match all rails supported across all destination account types.)
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/quotes/AccountDestination.yaml
Line: 17-23
Comment:
**No enum constraint on `paymentRail`**
The `paymentRail` field is defined as a free-form `type: string`, but the valid values are well-defined enums in the existing account info schemas. For example, `UsdAccountInfo.yaml` defines `paymentRails` items as an enum: `ACH`, `WIRE`, `RTP`, `FEDNOW`.
Without an enum constraint (or a `$ref` to a shared `PaymentRail` schema), API clients have no way to discover valid values from the spec alone, and invalid values will only be caught at runtime. Consider either:
1. Adding an enum with the superset of all supported rails (e.g., `ACH`, `WIRE`, `RTP`, `FEDNOW`, plus any non-USD rails), or
2. Extracting a shared `PaymentRail` schema and using `$ref` here — the same way `paymentRails` items in each `*AccountInfo.yaml` could reference it.
```suggestion
paymentRail:
type: string
enum:
- ACH
- WIRE
- RTP
- FEDNOW
description: >-
The payment rail to use for the transfer. Must be one of the rails
supported by the destination account. If not specified, the system
will select a default rail.
example: ACH
```
(Adjust the enum values to match all rails supported across all destination account types.)
How can I resolve this? If you propose a fix, please make it concise.
TL;DR
Added optional
paymentRailfield to theAccountDestinationschema to allow specifying the payment rail for transfers.What changed?
Added a new optional
paymentRailfield to theAccountDestinationschema with:How to test?
Test API requests that include the
AccountDestinationobject by:paymentRailfield specified (e.g., "ACH")paymentRailfield to verify default behaviorWhy make this change?
This change provides users with explicit control over which payment rail to use for transfers, while maintaining backward compatibility by making the field optional and preserving existing default rail selection behavior.