-
Notifications
You must be signed in to change notification settings - Fork 7
Add COP fields needed for Thunes standard-bank payouts #468
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 |
|---|---|---|
|
|
@@ -28,3 +28,19 @@ properties: | |
| description: The country of residence of the beneficiary | ||
| address: | ||
| $ref: ./Address.yaml | ||
| documentType: | ||
| type: string | ||
| description: 'Identity document type — required by most Colombian banks. | ||
| CC: Cédula de Ciudadanía, CE: Cédula de Extranjería, TI: Tarjeta de | ||
| Identidad, NIT: Número de Identificación Tributaria, PP: Passport' | ||
| enum: | ||
| - CC | ||
| - CE | ||
| - TI | ||
| - NIT | ||
| - PP | ||
| documentNumber: | ||
| type: string | ||
| description: Identity document number — required by most Colombian banks | ||
|
Comment on lines
+31
to
+44
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.
The PR description explicitly names the accepted values for If the set of valid Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/common/CopBeneficiary.yaml
Line: 31-38
Comment:
**`documentType` is unconstrained string; `documentNumber` lacks length guards**
The PR description explicitly names the accepted values for `documentType` (CC, CE, NIT, PP) and maps them to Thunes `id_type`. Without an `enum` constraint, any arbitrary string passes schema validation and the error will only surface at the Thunes payer-match step — after the payout has been accepted. Every other typed field in this PR adds stronger validation (`bankAccountType` gets an enum; `bankName` and `accountNumber` get `minLength`/`maxLength`). `documentNumber` similarly lacks `minLength: 1`, so an empty string is schema-valid even though Thunes would reject it.
If the set of valid `documentType` values is expected to grow over time (beyond CC/CE/NIT/PP), a comment explaining that is worth adding; otherwise an `enum` keeps the contract explicit and moves validation to the API boundary.
How can I resolve this? If you propose a fix, please make it concise. |
||
| minLength: 1 | ||
| maxLength: 50 | ||
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.
phoneNumberwas removed entirely. Because the schema is intentionally a union of both rails (per the PR description), the example now gives no indication of how a MOBILE_MONEY payload looks. Consider splitting into namedexamplesso consumers can see both rail shapes.Prompt To Fix With AI