Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
oneOf:
- title: US Account
$ref: ./UsAccountExternalAccountInfo.yaml
- title: CLABE Account
$ref: ./ClabeAccountExternalAccountInfo.yaml
- title: PIX Account
$ref: ./PixAccountExternalAccountInfo.yaml
- title: IBAN Account
$ref: ./IbanAccountExternalAccountInfo.yaml
- title: UPI Account
$ref: ./UpiAccountExternalAccountInfo.yaml
- title: NGN Account
$ref: ./NgnAccountExternalAccountInfo.yaml
- title: CAD Account
$ref: ./CadAccountExternalAccountInfo.yaml
- title: GBP Account
$ref: ./GbpAccountExternalAccountInfo.yaml
- title: PHP Account
$ref: ./PhpAccountExternalAccountInfo.yaml
- title: SGD Account
$ref: ./SgdAccountExternalAccountInfo.yaml
- title: Spark Wallet
$ref: ./SparkWalletExternalAccountInfo.yaml
- title: Lightning
$ref: ./LightningExternalAccountInfo.yaml
- title: Solana Wallet
$ref: ./SolanaWalletExternalAccountInfo.yaml
- title: Tron Wallet
$ref: ./TronWalletExternalAccountInfo.yaml
- title: Polygon Wallet
$ref: ./PolygonWalletExternalAccountInfo.yaml
- title: Base Wallet
$ref: ./BaseWalletExternalAccountInfo.yaml
- title: US Account
$ref: ./UsAccountExternalAccountInfo.yaml
- title: CLABE Account
$ref: ./ClabeAccountExternalAccountInfo.yaml
- title: PIX Account
$ref: ./PixAccountExternalAccountInfo.yaml
- title: IBAN Account
$ref: ./IbanAccountExternalAccountInfo.yaml
- title: UPI Account
$ref: ./UpiAccountExternalAccountInfo.yaml
- title: NGN Account
$ref: ./NgnAccountExternalAccountInfo.yaml
- title: CAD Account
$ref: ./CadAccountExternalAccountInfo.yaml
- title: GBP Account
$ref: ./GbpAccountExternalAccountInfo.yaml
- title: PHP Account
$ref: ./PhpAccountExternalAccountInfo.yaml
- title: SGD Account
$ref: ./SgdAccountExternalAccountInfo.yaml
- title: Spark Wallet
$ref: ./SparkWalletExternalAccountInfo.yaml
- title: Lightning
$ref: ./LightningExternalAccountInfo.yaml
- title: Solana Wallet
$ref: ./SolanaWalletExternalAccountInfo.yaml
- title: Tron Wallet
$ref: ./TronWalletExternalAccountInfo.yaml
- title: Polygon Wallet
$ref: ./PolygonWalletExternalAccountInfo.yaml
- title: Base Wallet
$ref: ./BaseWalletExternalAccountInfo.yaml
- title: MxnSpeiAccountInfo
$ref: ./MxnSpeiAccountInfo.yaml
- title: InrUpiAccountInfo
$ref: ./InrUpiAccountInfo.yaml
Comment on lines +34 to +37
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing updates to related schemas. Adding MXN_SPEI_ACCOUNT and INR_UPI_ACCOUNT types requires updates to:

  1. ExternalAccountType.yaml - add enum values
  2. BaseExternalAccountInfo.yaml - add discriminator mappings

Without these updates, the new account types won't be recognized as valid values.

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

Comment:
Missing updates to related schemas. Adding `MXN_SPEI_ACCOUNT` and `INR_UPI_ACCOUNT` types requires updates to:

1. `ExternalAccountType.yaml` - add enum values
2. `BaseExternalAccountInfo.yaml` - add discriminator mappings

Without these updates, the new account types won't be recognized as valid values.

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

discriminator:
propertyName: accountType
mapping:
Expand All @@ -50,3 +54,5 @@ discriminator:
TRON_WALLET: ./TronWalletExternalAccountInfo.yaml
POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml
BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml
MXN_SPEI_ACCOUNT: ./MxnSpeiAccountInfo.yaml
INR_UPI_ACCOUNT: ./InrUpiAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
type: object
title: InrUpiAccountInfo
description: Required fields for USD -> INR corridor via Upi
required:
- accountType
- beneficiary
- fullName
- vpa
properties:
accountType:
type: string
enum:
- INR_UPI_ACCOUNT
example: INR_UPI_ACCOUNT
fullName:
type: string
description: Full name of the beneficiary
example: John Michael Doe
vpa:
type: string
description: Virtual Payment Address (UPI)
example: john@upi
beneficiary:
oneOf:
- $ref: ./IndividualBeneficiary.yaml
- $ref: ./BusinessBeneficiary.yaml
discriminator:
propertyName: beneficiaryType
mapping:
INDIVIDUAL: ./IndividualBeneficiary.yaml
BUSINESS: ./BusinessBeneficiary.yaml
Comment on lines +1 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

Schema structure doesn't follow existing patterns. All other external account schemas use allOf with BaseExternalAccountInfo and a common schema ref (see UpiAccountExternalAccountInfo.yaml). This schema should:

  1. Use allOf pattern with BaseExternalAccountInfo.yaml
  2. Reference a common InrUpiAccountInfo.yaml schema in ../common/
  3. Use $ref: ./BeneficiaryOneOf.yaml for beneficiary instead of inline definition
  4. fullName should not be duplicated in both top-level and beneficiary (beneficiary already has this field)

Expected structure:

allOf:
  - $ref: ./BaseExternalAccountInfo.yaml
  - $ref: ../common/InrUpiAccountInfo.yaml
  - type: object
    required:
      - beneficiary
    properties:
      beneficiary:
        $ref: ./BeneficiaryOneOf.yaml

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/InrUpiAccountInfo.yaml
Line: 1:31

Comment:
Schema structure doesn't follow existing patterns. All other external account schemas use `allOf` with `BaseExternalAccountInfo` and a common schema ref (see `UpiAccountExternalAccountInfo.yaml`). This schema should:

1. Use `allOf` pattern with `BaseExternalAccountInfo.yaml`
2. Reference a common `InrUpiAccountInfo.yaml` schema in `../common/`
3. Use `$ref: ./BeneficiaryOneOf.yaml` for beneficiary instead of inline definition
4. `fullName` should not be duplicated in both top-level and beneficiary (beneficiary already has this field)

Expected structure:
```yaml
allOf:
  - $ref: ./BaseExternalAccountInfo.yaml
  - $ref: ../common/InrUpiAccountInfo.yaml
  - type: object
    required:
      - beneficiary
    properties:
      beneficiary:
        $ref: ./BeneficiaryOneOf.yaml
```

<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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
type: object
title: MxnSpeiAccountInfo
description: Required fields for USD -> MXN corridor via Spei
required:
- accountType
- beneficiary
- clabe
- name
properties:
accountType:
type: string
enum:
- MXN_SPEI_ACCOUNT
example: MXN_SPEI_ACCOUNT
clabe:
type: string
description: Mexican CLABE interbank account number (18 digits)
example: 012180001234567890
name:
type: string
description: Full name of the payee
example: Jane Smith
beneficiary:
oneOf:
- $ref: ./IndividualBeneficiary.yaml
- $ref: ./BusinessBeneficiary.yaml
discriminator:
propertyName: beneficiaryType
mapping:
INDIVIDUAL: ./IndividualBeneficiary.yaml
BUSINESS: ./BusinessBeneficiary.yaml
Comment on lines +1 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

Schema structure doesn't follow existing patterns. All other external account schemas use allOf with BaseExternalAccountInfo and a common schema ref (see ClabeAccountExternalAccountInfo.yaml, UpiAccountExternalAccountInfo.yaml). This schema should:

  1. Use allOf pattern with BaseExternalAccountInfo.yaml
  2. Reference a common MxnSpeiAccountInfo.yaml schema
  3. Use $ref: ./BeneficiaryOneOf.yaml for beneficiary instead of inline definition
  4. Field clabe should be clabeNumber (matches existing ClabeAccountInfo.yaml)

Expected structure:

allOf:
  - $ref: ./BaseExternalAccountInfo.yaml
  - $ref: ../common/MxnSpeiAccountInfo.yaml
  - type: object
    required:
      - beneficiary
    properties:
      beneficiary:
        $ref: ./BeneficiaryOneOf.yaml

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/MxnSpeiAccountInfo.yaml
Line: 1:31

Comment:
Schema structure doesn't follow existing patterns. All other external account schemas use `allOf` with `BaseExternalAccountInfo` and a common schema ref (see `ClabeAccountExternalAccountInfo.yaml`, `UpiAccountExternalAccountInfo.yaml`). This schema should:

1. Use `allOf` pattern with `BaseExternalAccountInfo.yaml`
2. Reference a common `MxnSpeiAccountInfo.yaml` schema
3. Use `$ref: ./BeneficiaryOneOf.yaml` for beneficiary instead of inline definition
4. Field `clabe` should be `clabeNumber` (matches existing `ClabeAccountInfo.yaml`)

Expected structure:
```yaml
allOf:
  - $ref: ./BaseExternalAccountInfo.yaml
  - $ref: ../common/MxnSpeiAccountInfo.yaml
  - type: object
    required:
      - beneficiary
    properties:
      beneficiary:
        $ref: ./BeneficiaryOneOf.yaml
```

<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.