-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Update external account schemas from webdev #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| type: object | ||
| title: BRL Account | ||
| description: 'Required fields for USD -> BRL corridor. Supported payment rails: Pix.' | ||
| required: | ||
| - accountType | ||
| - pixKey | ||
| - pixKeyType | ||
| - taxId | ||
| - beneficiary | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - BRL_ACCOUNT | ||
| example: BRL_ACCOUNT | ||
| payment_rails: | ||
| type: array | ||
| items: | ||
| type: string | ||
| const: | ||
| - Pix | ||
| description: Supported payment rails for this currency. Auto-populated based on | ||
| account type. | ||
| receivingCurrency: | ||
| type: string | ||
| const: BRL | ||
| description: Receiving currency code. Auto-populated based on account type. | ||
| pixKey: | ||
| type: string | ||
| description: The PIX key of the bank | ||
| pixKeyType: | ||
| type: string | ||
| description: The type of PIX key of the bank | ||
| taxId: | ||
| type: string | ||
| description: The tax ID of the bank account | ||
| beneficiary: | ||
| type: object | ||
| required: | ||
| - fullName | ||
| properties: | ||
| fullName: | ||
| type: string | ||
| description: The full name of the beneficiary | ||
| birthDate: | ||
| type: string | ||
| description: The birth date of the beneficiary | ||
| nationality: | ||
| type: string | ||
| description: The nationality of the beneficiary | ||
| email: | ||
| type: string | ||
| description: The email of the beneficiary | ||
| phoneNumber: | ||
| type: string | ||
| description: The phone number of the beneficiary | ||
| registrationNumber: | ||
| type: string | ||
| description: The registration number of the beneficiary | ||
| countryOfResidence: | ||
| type: string | ||
| description: The country of residence of the beneficiary | ||
| address: | ||
| type: object | ||
| required: [] | ||
| properties: | ||
| line1: | ||
| type: string | ||
| description: Address line 1 | ||
| postalCode: | ||
| type: string | ||
| description: Postal code | ||
| country: | ||
| type: string | ||
| description: Country code | ||
| line2: | ||
| type: string | ||
| description: Address line 2 | ||
| city: | ||
| type: string | ||
| description: City | ||
| state: | ||
| type: string | ||
| description: State or province |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| type: object | ||
| title: DKK Account | ||
| description: 'Required fields for USD -> DKK corridor. Supported payment rails: Sepa.' | ||
| required: | ||
| - accountType | ||
| - iban | ||
| - beneficiary | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - DKK_ACCOUNT | ||
| example: DKK_ACCOUNT | ||
| payment_rails: | ||
| type: array | ||
| items: | ||
| type: string | ||
| const: | ||
| - Sepa | ||
| description: Supported payment rails for this currency. Auto-populated based on | ||
| account type. | ||
| receivingCurrency: | ||
| type: string | ||
| const: DKK | ||
| description: Receiving currency code. Auto-populated based on account type. | ||
| iban: | ||
| type: string | ||
| description: The IBAN of the bank | ||
| swiftBic: | ||
| type: string | ||
| description: The SWIFT BIC of the bank | ||
| beneficiary: | ||
| type: object | ||
| required: | ||
| - fullName | ||
| properties: | ||
| fullName: | ||
| type: string | ||
| description: The full name of the beneficiary | ||
| birthDate: | ||
| type: string | ||
| description: The birth date of the beneficiary | ||
| nationality: | ||
| type: string | ||
| description: The nationality of the beneficiary | ||
| email: | ||
| type: string | ||
| description: The email of the beneficiary | ||
| phoneNumber: | ||
| type: string | ||
| description: The phone number of the beneficiary | ||
| registrationNumber: | ||
| type: string | ||
| description: The registration number of the beneficiary | ||
| countryOfResidence: | ||
| type: string | ||
| description: The country of residence of the beneficiary | ||
| address: | ||
| type: object | ||
| required: [] | ||
| properties: | ||
| line1: | ||
| type: string | ||
| description: Address line 1 | ||
| postalCode: | ||
| type: string | ||
| description: Postal code | ||
| country: | ||
| type: string | ||
| description: Country code | ||
| line2: | ||
| type: string | ||
| description: Address line 2 | ||
| city: | ||
| type: string | ||
| description: City | ||
| state: | ||
| type: string | ||
| description: State or province |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,49 +1,62 @@ | ||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||
| # Fiat accounts | ||||||||||||||||||||||||||
| - title: BRL Account | ||||||||||||||||||||||||||
| $ref: ./BrlAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: DKK Account | ||||||||||||||||||||||||||
| $ref: ./DkkAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: GBP Account | ||||||||||||||||||||||||||
| $ref: ./GbpAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: HKD Account | ||||||||||||||||||||||||||
| $ref: ./HkdAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: IDR Account | ||||||||||||||||||||||||||
| $ref: ./IdrAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: INR Account | ||||||||||||||||||||||||||
| $ref: ./InrAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: MXN Account | ||||||||||||||||||||||||||
| $ref: ./MxnAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: MYR Account | ||||||||||||||||||||||||||
| $ref: ./MyrAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: PHP Account | ||||||||||||||||||||||||||
| $ref: ./PhpAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: SGD Account | ||||||||||||||||||||||||||
|
Comment on lines
7
to
21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 16:20
Comment:
Duplicate `GBP Account` entry exists at line 56. The oneOf array now has two entries with title "GBP Account" - one referencing `./GbpAccountExternalAccountInfo.yaml` (line 17) and another referencing `./GbpAccountInfo.yaml` (line 57). This will cause OpenAPI validation errors.
```suggestion
- title: GBP Account
$ref: ./GbpAccountExternalAccountInfo.yaml
```
How can I resolve this? If you propose a fix, please make it concise.
Comment on lines
19
to
21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 18:20
Comment:
Duplicate `PHP Account` entry exists at line 44. The oneOf array now has two entries with title "PHP Account" - one referencing `./PhpAccountExternalAccountInfo.yaml` (line 19) and another referencing `./PhpAccountInfo.yaml` (line 45). This will cause OpenAPI validation errors.
```suggestion
- title: PHP Account
$ref: ./PhpAccountExternalAccountInfo.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||||||||||||||
| $ref: ./SgdAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: THB Account | ||||||||||||||||||||||||||
| $ref: ./ThbAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: USD Account | ||||||||||||||||||||||||||
| $ref: ./UsdAccountInfo.yaml | ||||||||||||||||||||||||||
| - title: VND Account | ||||||||||||||||||||||||||
| $ref: ./VndAccountInfo.yaml | ||||||||||||||||||||||||||
| # Crypto wallets | ||||||||||||||||||||||||||
| - 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 | ||||||||||||||||||||||||||
| discriminator: | ||||||||||||||||||||||||||
| propertyName: accountType | ||||||||||||||||||||||||||
| mapping: | ||||||||||||||||||||||||||
| US_ACCOUNT: ./UsAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| CLABE: ./ClabeAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| PIX: ./PixAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| IBAN: ./IbanAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| UPI: ./UpiAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| NGN_ACCOUNT: ./NgnAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| CAD_ACCOUNT: ./CadAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| GBP_ACCOUNT: ./GbpAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| PHP_ACCOUNT: ./PhpAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| SGD_ACCOUNT: ./SgdAccountExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| # Fiat accounts | ||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these existing fiat account types be deleted? |
||||||||||||||||||||||||||
| BRL_ACCOUNT: ./BrlAccountInfo.yaml | ||||||||||||||||||||||||||
| DKK_ACCOUNT: ./DkkAccountInfo.yaml | ||||||||||||||||||||||||||
| GBP_ACCOUNT: ./GbpAccountInfo.yaml | ||||||||||||||||||||||||||
| HKD_ACCOUNT: ./HkdAccountInfo.yaml | ||||||||||||||||||||||||||
| IDR_ACCOUNT: ./IdrAccountInfo.yaml | ||||||||||||||||||||||||||
| INR_ACCOUNT: ./InrAccountInfo.yaml | ||||||||||||||||||||||||||
| MXN_ACCOUNT: ./MxnAccountInfo.yaml | ||||||||||||||||||||||||||
| MYR_ACCOUNT: ./MyrAccountInfo.yaml | ||||||||||||||||||||||||||
| PHP_ACCOUNT: ./PhpAccountInfo.yaml | ||||||||||||||||||||||||||
| SGD_ACCOUNT: ./SgdAccountInfo.yaml | ||||||||||||||||||||||||||
| THB_ACCOUNT: ./ThbAccountInfo.yaml | ||||||||||||||||||||||||||
| USD_ACCOUNT: ./UsdAccountInfo.yaml | ||||||||||||||||||||||||||
| VND_ACCOUNT: ./VndAccountInfo.yaml | ||||||||||||||||||||||||||
|
Comment on lines
+45
to
+58
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discriminator enum mismatch
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 45:58
Comment:
**Discriminator enum mismatch**
`ExternalAccountInfoOneOf`'s discriminator mapping includes `BRL_ACCOUNT`, `DKK_ACCOUNT`, `HKD_ACCOUNT`, etc., but `ExternalAccountType.yaml` (the shared `accountType` enum) still appears to only include the older set (US/CLABE/PIX/IBAN/UPI/NGN/CAD/GBP/PHP/SGD + wallets). If `accountType` is constrained by that enum anywhere in request/response schemas, these new fiat account types will fail validation. Either extend `ExternalAccountType.yaml` to include the new values or avoid referencing that enum for the new account shapes so the spec remains self-consistent.
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||||||||||||||
| # Crypto wallets | ||||||||||||||||||||||||||
| SPARK_WALLET: ./SparkWalletExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| LIGHTNING: ./LightningExternalAccountInfo.yaml | ||||||||||||||||||||||||||
| SOLANA_WALLET: ./SolanaWalletExternalAccountInfo.yaml | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken discriminator mapping
BaseExternalAccountInfo's discriminator mapping now only includes GBP/PHP/SGD (plus wallets), butExternalAccountType.yamlstill enumerates many otheraccountTypes (e.g.US_ACCOUNT,CLABE,PIX,IBAN,UPI,NGN_ACCOUNT,CAD_ACCOUNT). Any payload with those accountType values will no longer have a discriminator mapping target, which typically breaks schema validation / codegen for discriminated unions. Update the mapping (and/or the enum/oneOf) so everyExternalAccountTypevalue is represented, or remove unsupported types consistently across the spec.Prompt To Fix With AI