-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Update external account schemas from webdev #165
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| 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: string | ||
| description: The address of the beneficiary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| 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: string | ||
| description: The address of the beneficiary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,60 @@ | ||
| 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: THB Account | ||
| $ref: ./ThbAccountInfo.yaml | ||
| - title: BRL Account | ||
| $ref: ./BrlAccountInfo.yaml | ||
| - title: IDR Account | ||
| $ref: ./IdrAccountInfo.yaml | ||
| - title: SGD Account | ||
| $ref: ./SgdAccountInfo.yaml | ||
| - title: PHP Account | ||
| $ref: ./PhpAccountInfo.yaml | ||
| - title: MYR Account | ||
| $ref: ./MyrAccountInfo.yaml | ||
| - title: INR Account | ||
| $ref: ./InrAccountInfo.yaml | ||
| - title: DKK Account | ||
| $ref: ./DkkAccountInfo.yaml | ||
| - title: VND Account | ||
| $ref: ./VndAccountInfo.yaml | ||
| - title: MXN Account | ||
| $ref: ./MxnAccountInfo.yaml | ||
| - title: GBP Account | ||
| $ref: ./GbpAccountInfo.yaml | ||
| - title: HKD Account | ||
| $ref: ./HkdAccountInfo.yaml | ||
|
Comment on lines
+34
to
+57
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. OneOf entries don’t match mapping New account types were added to Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 34:57
Comment:
**OneOf entries don’t match mapping**
New account types were added to `oneOf` (THB/BRL/IDR/MYR/INR/DKK/VND/MXN/HKD), but the `discriminator.mapping` is missing several of them: `SGD_ACCOUNT`, `PHP_ACCOUNT`, and `GBP_ACCOUNT` are present (legacy), but `THB_ACCOUNT`, `BRL_ACCOUNT`, `IDR_ACCOUNT`, `MYR_ACCOUNT`, `INR_ACCOUNT`, `DKK_ACCOUNT`, `VND_ACCOUNT`, `MXN_ACCOUNT`, `HKD_ACCOUNT` are mapped, while the `oneOf` also includes `SgdAccountInfo.yaml`, `PhpAccountInfo.yaml`, `GbpAccountInfo.yaml` without corresponding mapping updates. For `oneOf`+discriminator, mapping should point to the same schemas listed in `oneOf` for each discriminator value, otherwise tools can’t reliably select the correct variant. Align `oneOf` entries and `mapping` so each discriminator value maps to exactly one schema in `oneOf`.
How can I resolve this? If you propose a fix, please make it concise. |
||
| discriminator: | ||
| propertyName: accountType | ||
| mapping: | ||
|
|
@@ -50,3 +74,12 @@ discriminator: | |
| TRON_WALLET: ./TronWalletExternalAccountInfo.yaml | ||
| POLYGON_WALLET: ./PolygonWalletExternalAccountInfo.yaml | ||
| BASE_WALLET: ./BaseWalletExternalAccountInfo.yaml | ||
| THB_ACCOUNT: ./ThbAccountInfo.yaml | ||
| BRL_ACCOUNT: ./BrlAccountInfo.yaml | ||
| IDR_ACCOUNT: ./IdrAccountInfo.yaml | ||
| MYR_ACCOUNT: ./MyrAccountInfo.yaml | ||
| INR_ACCOUNT: ./InrAccountInfo.yaml | ||
| DKK_ACCOUNT: ./DkkAccountInfo.yaml | ||
| VND_ACCOUNT: ./VndAccountInfo.yaml | ||
| MXN_ACCOUNT: ./MxnAccountInfo.yaml | ||
| HKD_ACCOUNT: ./HkdAccountInfo.yaml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| type: object | ||
| title: GBP Account | ||
| description: 'Required fields for USD -> GBP corridor. Supported payment rails: Local.' | ||
| required: | ||
| - accountType | ||
| - sortCode | ||
| - accountNumber | ||
| - beneficiary | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - GBP_ACCOUNT | ||
| example: GBP_ACCOUNT | ||
| payment_rails: | ||
| type: array | ||
| items: | ||
| type: string | ||
| const: | ||
| - Local | ||
| description: Supported payment rails for this currency. Auto-populated based on | ||
| account type. | ||
| receivingCurrency: | ||
| type: string | ||
| const: GBP | ||
| description: Receiving currency code. Auto-populated based on account type. | ||
| sortCode: | ||
| type: string | ||
| description: The sort code of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: The account number 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: string | ||
| description: The address of the beneficiary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| type: object | ||
| title: HKD Account | ||
| description: 'Required fields for USD -> HKD corridor. Supported payment rails: Local.' | ||
| required: | ||
| - accountType | ||
| - bankName | ||
| - accountNumber | ||
| - beneficiary | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - HKD_ACCOUNT | ||
| example: HKD_ACCOUNT | ||
| payment_rails: | ||
| type: array | ||
| items: | ||
| type: string | ||
| const: | ||
| - Local | ||
| description: Supported payment rails for this currency. Auto-populated based on | ||
| account type. | ||
| receivingCurrency: | ||
| type: string | ||
| const: HKD | ||
| description: Receiving currency code. Auto-populated based on account type. | ||
| bankName: | ||
| type: string | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: The account number 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: string | ||
| description: The address of the beneficiary |
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.
Duplicate oneOf variants
ExternalAccountInfoOneOf.yamlnow includes both the legacy...ExternalAccountInfo.yamlschemas and new...AccountInfo.yamlschemas for the same account types (e.g., GBP/SGD/PHP). Withdiscriminator.propertyName: accountTypemapping those accountTypes to the legacy schemas (e.g.,GBP_ACCOUNT -> ./GbpAccountExternalAccountInfo.yaml), any payload withaccountType: GBP_ACCOUNTwill be ambiguous against twooneOfoptions (and the new...AccountInfo.yamloption isn’t selected by the discriminator mapping). This typically causes OpenAPI validation/bundling failures foroneOf+discriminator, and makes the schema inconsistent. Remove the duplicate...AccountInfo.yamlentries for types that already exist, or update mapping and ensure eachaccountTypemaps to a singleoneOfvariant.Prompt To Fix With AI