-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Update external account schemas from webdev #160
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,59 @@ | ||
| type: object | ||
| title: INR Account | ||
| description: 'Required fields for USD -> INR corridor. Supported payment rails: Upi.' | ||
| required: | ||
| - accountType | ||
| - vpa | ||
| - beneficiary | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - INR_ACCOUNT | ||
| example: INR_ACCOUNT | ||
| payment_rails: | ||
| type: array | ||
| items: | ||
| type: string | ||
| const: | ||
| - Upi | ||
| description: Supported payment rails for this currency. Auto-populated based on | ||
| account type. | ||
| receivingCurrency: | ||
| type: string | ||
| const: INR | ||
| description: Receiving currency code. Auto-populated based on account type. | ||
| vpa: | ||
| type: string | ||
| description: The VPA of the bank | ||
| beneficiary: | ||
| type: object | ||
| required: | ||
| - birthDate | ||
| - fullName | ||
| - nationality | ||
| 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 | ||
|
Comment on lines
+29
to
+59
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. Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., 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 AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/InrAccountInfo.yaml
Line: 29:59
Comment:
Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., `ClabeAccountExternalAccountInfo.yaml:8`, `UpiAccountExternalAccountInfo.yaml:8`) reference `BeneficiaryOneOf.yaml` which provides proper discriminator-based typing between `INDIVIDUAL` and `BUSINESS` beneficiaries with `beneficiaryType` property.
<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,61 @@ | ||
| type: object | ||
| title: MXN Account | ||
| description: 'Required fields for USD -> MXN corridor. Supported payment rails: Spei.' | ||
| required: | ||
| - accountType | ||
| - clabeNumber | ||
| - beneficiary | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - MXN_ACCOUNT | ||
| example: MXN_ACCOUNT | ||
| payment_rails: | ||
| type: array | ||
| items: | ||
| type: string | ||
| const: | ||
| - Spei | ||
| description: Supported payment rails for this currency. Auto-populated based on | ||
| account type. | ||
| receivingCurrency: | ||
| type: string | ||
| const: MXN | ||
| description: Receiving currency code. Auto-populated based on account type. | ||
| clabeNumber: | ||
| type: string | ||
| description: The CLABE number of the bank | ||
| example: '123456789012345678' | ||
| minLength: 18 | ||
| maxLength: 18 | ||
| pattern: ^[0-9]{18}$ | ||
| 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 | ||
|
Comment on lines
+1
to
+61
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. Schema doesn't follow the existing architecture pattern used by other account types. Compare with Also missing 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 AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/MxnAccountInfo.yaml
Line: 1:61
Comment:
Schema doesn't follow the existing architecture pattern used by other account types. Compare with `ClabeAccountExternalAccountInfo.yaml` (lines 1-9) which uses `allOf` to compose `BaseExternalAccountInfo.yaml`, `common/ClabeAccountInfo.yaml`, and adds beneficiary requirements. This schema duplicates the CLABE field definition instead of referencing the common schema.
Also missing `MXN_ACCOUNT` from `ExternalAccountType.yaml` enum and `BaseExternalAccountInfo.yaml` discriminator mapping.
<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.
Comment on lines
+33
to
+61
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. Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., 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 AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/MxnAccountInfo.yaml
Line: 33:61
Comment:
Beneficiary structure is inconsistent with existing pattern. Other external account types (e.g., `ClabeAccountExternalAccountInfo.yaml:8`, `UpiAccountExternalAccountInfo.yaml:8`) reference `BeneficiaryOneOf.yaml` which provides proper discriminator-based typing between `INDIVIDUAL` and `BUSINESS` beneficiaries with `beneficiaryType` property.
<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. |
||
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.
Schema doesn't follow the existing architecture pattern used by other account types. Compare with
UpiAccountExternalAccountInfo.yaml(lines 1-9) which usesallOfto composeBaseExternalAccountInfo.yaml,common/UpiAccountInfo.yaml, and adds beneficiary requirements. This schema duplicates the VPA field definition instead of referencing the common schema.Also missing
INR_ACCOUNTfromExternalAccountType.yamlenum andBaseExternalAccountInfo.yamldiscriminator mapping.Prompt To Fix With AI