Skip to content
Closed
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
63 changes: 63 additions & 0 deletions mintlify/openapi.yaml

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

63 changes: 63 additions & 0 deletions openapi.yaml

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

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ enum:
- FBO
- UPI
- NGN_ACCOUNT
- SWIFT_ACCOUNT
- SPARK_WALLET
- LIGHTNING
- SOLANA_WALLET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ discriminator:
FBO: ./PaymentFboAccountInfo.yaml
UPI: ./PaymentUpiAccountInfo.yaml
NGN_ACCOUNT: ./PaymentNgnAccountInfo.yaml
SWIFT_ACCOUNT: ./PaymentSwiftAccountInfo.yaml
SPARK_WALLET: ./PaymentSparkWalletInfo.yaml
LIGHTNING: ./PaymentLightningInvoiceInfo.yaml
SOLANA_WALLET: ./PaymentSolanaWalletInfo.yaml
TRON_WALLET: ./PaymentTronWalletInfo.yaml
POLYGON_WALLET: ./PaymentPolygonWalletInfo.yaml
POLYGON_WALLET: ./PaymentPolygonWalletInfo.yaml
12 changes: 12 additions & 0 deletions openapi/components/schemas/common/PaymentSwiftAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
allOf:
- $ref: ./PaymentAccountOrWalletInfo.yaml
- $ref: ./SwiftAccountInfo.yaml
required:
- reference
properties:
reference:
type: string
description: >-
Unique reference code that must be included with the payment to properly
credit it
example: UMA-Q12345-REF
Comment on lines +1 to +12
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Schema structure issue: required and properties should be inside allOf.

The required and properties blocks are siblings of allOf rather than part of the composition. In OpenAPI 3.x, this structure may not correctly merge the additional reference field with the composed schemas. To properly extend the composed schemas with additional fields, wrap them in a third object within allOf.

Proposed fix
 allOf:
   - $ref: ./PaymentAccountOrWalletInfo.yaml
   - $ref: ./SwiftAccountInfo.yaml
-required:
-  - reference
-properties:
-  reference:
-    type: string
-    description: >-
-      Unique reference code that must be included with the payment to properly
-      credit it
-    example: UMA-Q12345-REF
+  - type: object
+    required:
+      - reference
+    properties:
+      reference:
+        type: string
+        description: >-
+          Unique reference code that must be included with the payment to properly
+          credit it
+        example: UMA-Q12345-REF
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
allOf:
- $ref: ./PaymentAccountOrWalletInfo.yaml
- $ref: ./SwiftAccountInfo.yaml
required:
- reference
properties:
reference:
type: string
description: >-
Unique reference code that must be included with the payment to properly
credit it
example: UMA-Q12345-REF
allOf:
- $ref: ./PaymentAccountOrWalletInfo.yaml
- $ref: ./SwiftAccountInfo.yaml
- type: object
required:
- reference
properties:
reference:
type: string
description: >-
Unique reference code that must be included with the payment to properly
credit it
example: UMA-Q12345-REF
🤖 Prompt for AI Agents
In `@openapi/components/schemas/common/PaymentSwiftAccountInfo.yaml` around lines
1 - 12, The PaymentSwiftAccountInfo schema places required and properties
alongside allOf instead of merging them; move the required and properties into a
third object inside allOf so the composed schemas (the $refs to
PaymentAccountOrWalletInfo and SwiftAccountInfo) are extended properly by an
object that declares the reference property and its requirement; update the
allOf array in PaymentSwiftAccountInfo.yaml to include that new object
containing the reference property and required:["reference"].

24 changes: 24 additions & 0 deletions openapi/components/schemas/common/SwiftAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type: object
required:
- accountType
- accountNumber
- bankName
properties:
accountType:
type: string
enum: [SWIFT_ACCOUNT]
example: SWIFT_ACCOUNT
accountNumber:
type: string
description: Bank account number
example: '1234567890'
swiftBic:
type: string
description: SWIFT/BIC code (8 or 11 characters). Recommended for international transfers.
example: DBSASG2X
minLength: 8
maxLength: 11
bankName:
type: string
description: Name of the bank
example: DBS Bank
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
allOf:
allOf:
Copy link

Choose a reason for hiding this comment

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

syntax: incorrect indentation - this line should start at column 0, not with 2 spaces

Suggested change
allOf:
allOf:

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml
Line: 1:1

Comment:
**syntax:** incorrect indentation - this line should start at column 0, not with 2 spaces

```suggestion
allOf:
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

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

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Invalid YAML structure: root-level indentation.

The allOf: directive at line 1 has leading whitespace, which makes it a nested element rather than a root-level declaration. This will likely cause YAML parsing errors or unexpected schema behavior since OpenAPI expects the schema definition to start at column 0.

Proposed fix
-  allOf:
+allOf:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
allOf:
allOf:
🤖 Prompt for AI Agents
In
`@openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml`
at line 1, The YAML schema file ExternalAccountCreateRequest.yaml has leading
whitespace before the root key "allOf", causing it to be nested instead of a
top-level declaration; update the file so "allOf:" starts at column 0 (no
leading spaces) and re-indent the subsequent lines accordingly to maintain valid
YAML/OpenAPI structure, then run a YAML/OpenAPI validator to confirm the schema
parses correctly.

- type: object
required:
- currency
Expand Down Expand Up @@ -29,4 +29,4 @@ allOf:
incoming UMA payments will be deposited into the primary internal account for the customer.
default: false
accountInfo:
$ref: ./ExternalAccountInfo.yaml
$ref: ./ExternalAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ oneOf:
$ref: ./UpiAccountExternalAccountInfo.yaml
- title: NGN Account
$ref: ./NgnAccountExternalAccountInfo.yaml
- title: SWIFT Account
$ref: ./SwiftAccountExternalAccountInfo.yaml
- title: Spark Wallet
$ref: ./SparkWalletExternalAccountInfo.yaml
- title: Lightning
Expand All @@ -32,6 +34,7 @@ discriminator:
IBAN: ./IbanAccountExternalAccountInfo.yaml
UPI: ./UpiAccountExternalAccountInfo.yaml
NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml
SWIFT_ACCOUNT: ./SwiftAccountExternalAccountInfo.yaml
SPARK_WALLET: ./SparkWalletExternalAccountInfo.yaml
LIGHTNING: ./LightningExternalAccountInfo.yaml
SOLANA_WALLET: ./SolanaWalletExternalAccountInfo.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
allOf:
- $ref: ../common/SwiftAccountInfo.yaml
- type: object
required:
- accountType
properties:
accountType:
type: string
enum: [SWIFT_ACCOUNT]
example: SWIFT_ACCOUNT
beneficiary:
oneOf:
- $ref: ./IndividualBeneficiary.yaml
- $ref: ./BusinessBeneficiary.yaml
discriminator:
propertyName: beneficiaryType
mapping:
INDIVIDUAL: ./IndividualBeneficiary.yaml
BUSINESS: ./BusinessBeneficiary.yaml