Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions openapi/components/schemas/common/BdtAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
type: object
required:
- accountType
- paymentRails
- accountNumber
- branchCode
- phoneNumber
properties:
accountType:
type: string
enum:
- BDT_ACCOUNT
paymentRails:
type: array
items:
type: string
enum:
- BANK_TRANSFER
- MOBILE_MONEY
accountNumber:
type: string
description: The account number of the bank
minLength: 1
maxLength: 34
branchCode:
type: string
description: The branch code
minLength: 5
maxLength: 5
pattern: ^[0-9]{5}$
swiftCode:
type: string
description: The SWIFT/BIC code of the bank
example: DEUTDEFF
minLength: 8
maxLength: 11
pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
phoneNumber:
type: string
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
33 changes: 33 additions & 0 deletions openapi/components/schemas/common/BdtBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
- fullName
properties:
beneficiaryType:
type: string
enum:
- INDIVIDUAL
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:
$ref: ./Address.yaml
37 changes: 37 additions & 0 deletions openapi/components/schemas/common/CopAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
type: object
required:
- accountType
- paymentRails
- accountNumber
- bankAccountType
- phoneNumber
properties:
accountType:
type: string
enum:
- COP_ACCOUNT
paymentRails:
type: array
items:
type: string
enum:
- BANK_TRANSFER
- MOBILE_MONEY
accountNumber:
type: string
description: The account number of the bank
minLength: 1
maxLength: 34
bankAccountType:
type: string
description: The bank account type
enum:
- CHECKING
- SAVINGS
phoneNumber:
type: string
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
34 changes: 34 additions & 0 deletions openapi/components/schemas/common/CopBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
- countryOfResidence
- fullName
properties:
beneficiaryType:
type: string
enum:
- INDIVIDUAL
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:
$ref: ./Address.yaml
35 changes: 35 additions & 0 deletions openapi/components/schemas/common/EgpAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
type: object
required:
- accountType
- paymentRails
- accountNumber
properties:
accountType:
type: string
enum:
- EGP_ACCOUNT
paymentRails:
type: array
items:
type: string
enum:
- BANK_TRANSFER
accountNumber:
type: string
description: The account number of the bank
minLength: 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 German IBAN example for Egyptian account schema

The iban field example DE89370400440532013000 is a German IBAN (prefix DE). For an Egyptian Pound (EGP) account, this example should use an Egyptian IBAN (prefix EG). While this is just an example and the pattern correctly validates any country's IBAN format, it may confuse API consumers integrating with EGP payment flows.

The same issue appears in PkrAccountInfo.yaml line 17, which also uses the German IBAN example despite being a Pakistani Rupee (PKR) account schema (Pakistan IBANs use PK prefix).

Suggested change
minLength: 1
example: EG800002000156789012345180002
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/EgpAccountInfo.yaml
Line: 20

Comment:
**German IBAN example for Egyptian account schema**

The `iban` field example `DE89370400440532013000` is a German IBAN (prefix `DE`). For an Egyptian Pound (EGP) account, this example should use an Egyptian IBAN (prefix `EG`). While this is just an example and the `pattern` correctly validates any country's IBAN format, it may confuse API consumers integrating with EGP payment flows.

The same issue appears in `PkrAccountInfo.yaml` line 17, which also uses the German IBAN example despite being a Pakistani Rupee (PKR) account schema (Pakistan IBANs use `PK` prefix).

```suggestion
    example: EG800002000156789012345180002
```

How can I resolve this? If you propose a fix, please make it concise.

maxLength: 34
iban:
type: string
description: The IBAN of the bank account
example: DE89370400440532013000
minLength: 15
maxLength: 34
pattern: ^[A-Z]{2}[0-9]{2}[A-Za-z0-9]{11,30}$
swiftCode:
type: string
description: The SWIFT/BIC code of the bank
example: DEUTDEFF
minLength: 8
maxLength: 11
pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
35 changes: 35 additions & 0 deletions openapi/components/schemas/common/EgpBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
- countryOfResidence
- fullName
- phoneNumber
properties:
beneficiaryType:
type: string
enum:
- INDIVIDUAL
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:
$ref: ./Address.yaml
30 changes: 30 additions & 0 deletions openapi/components/schemas/common/GhsAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
type: object
required:
- accountType
- paymentRails
- accountNumber
- phoneNumber
properties:
accountType:
type: string
enum:
- GHS_ACCOUNT
paymentRails:
type: array
items:
type: string
enum:
- BANK_TRANSFER
- MOBILE_MONEY
accountNumber:
type: string
description: The account number of the bank
minLength: 1
maxLength: 34
phoneNumber:
type: string
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
33 changes: 33 additions & 0 deletions openapi/components/schemas/common/GhsBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
- fullName
properties:
beneficiaryType:
type: string
enum:
- INDIVIDUAL
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:
$ref: ./Address.yaml
30 changes: 30 additions & 0 deletions openapi/components/schemas/common/GtqAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
type: object
required:
- accountType
- paymentRails
- accountNumber
- phoneNumber
properties:
accountType:
type: string
enum:
- GTQ_ACCOUNT
paymentRails:
type: array
items:
type: string
enum:
- BANK_TRANSFER
- MOBILE_MONEY
accountNumber:
type: string
description: The account number of the bank
minLength: 1
maxLength: 34
phoneNumber:
type: string
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
34 changes: 34 additions & 0 deletions openapi/components/schemas/common/GtqBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
- countryOfResidence
- fullName
properties:
beneficiaryType:
type: string
enum:
- INDIVIDUAL
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:
$ref: ./Address.yaml
23 changes: 23 additions & 0 deletions openapi/components/schemas/common/HtgAccountInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
type: object
required:
- accountType
- paymentRails
- phoneNumber
properties:
accountType:
type: string
enum:
- HTG_ACCOUNT
paymentRails:
type: array
items:
type: string
enum:
- MOBILE_MONEY
phoneNumber:
type: string
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
Loading
Loading