-
Notifications
You must be signed in to change notification settings - Fork 7
chore: Sync account schemas #609
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
|---|---|---|
|
|
@@ -9,5 +9,5 @@ allOf: | |
| items: | ||
| type: string | ||
| enum: | ||
| - MOBILE_MONEY | ||
| - BANK_TRANSFER | ||
| - MOBILE_MONEY | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,31 +6,31 @@ description: 'Required fields depend on the selected paymentRails: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - BANK_TRANSFER: accountNumber, bankName | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - MOBILE_MONEY: phoneNumber, bankName' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - MOBILE_MONEY: bankName, phoneNumber' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| properties: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| accountType: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - CNY_ACCOUNT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| accountNumber: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The destination bank account number (BANK_TRANSFER rail) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The account number of the bank | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minLength: 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxLength: 34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bankName: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The name of the bank | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minLength: 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxLength: 255 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phoneNumber: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The phone number in international format (MOBILE_MONEY rail) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The phone number in international format | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
15
to
+27
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.
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/common/CnyAccountInfoBase.yaml
Line: 15-27
Comment:
The descriptions for `accountNumber` and `phoneNumber` previously called out which payment rail each field applies to ("BANK_TRANSFER rail" / "MOBILE_MONEY rail"). Those rail hints were the only inline guidance telling integrators when to supply each field; removing them leaves users to rely solely on the prose block at the top of the schema.
```suggestion
accountNumber:
type: string
description: The destination bank account number (BANK_TRANSFER rail)
minLength: 1
maxLength: 34
bankName:
type: string
description: The name of the bank or mobile-wallet provider
minLength: 1
maxLength: 255
phoneNumber:
type: string
description: The phone number in international format (MOBILE_MONEY rail)
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| example: '+1234567890' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minLength: 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxLength: 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern: ^\+[0-9]{6,14}$ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bankName: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The name of the bank or mobile-wallet provider | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minLength: 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxLength: 255 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| accountType: CNY_ACCOUNT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| accountNumber: '1234567890' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bankName: Example Bank | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phoneNumber: '+1234567890' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bankName: China Construction Bank | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
bankNamedescription was narrowed from "The name of the bank or mobile-wallet provider" to "The name of the bank", but this field is still required for the MOBILE_MONEY rail (as stated in the schema description above). For MOBILE_MONEY payments there is no bank — the value is the mobile-wallet provider name. Dropping that clause leaves MOBILE_MONEY integrators without the guidance they need and could cause incorrect payloads to be submitted.Prompt To Fix With AI