Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions openapi/components/schemas/quotes/AccountDestination.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ allOf:
type: string
description: Destination account identifier
example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
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
Comment on lines +17 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.
Suggested change
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.

description: Destination account details
Loading