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
17 changes: 14 additions & 3 deletions openapi/components/schemas/common/BrlAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ properties:
- PIX
pixKey:
type: string
description: The PIX key of the bank
description: The PIX key (email, phone, CPF, CNPJ, or random)
minLength: 1
maxLength: 77
pixKeyType:
type: string
description: The type of PIX key of the bank
description: The type of PIX key
enum:
- email
- phone
- cpf
- cnpj
- random
taxId:
type: string
description: The tax ID of the bank account
description: The tax ID (CPF or CNPJ)
minLength: 11
maxLength: 14
pattern: ^[0-9]{11,14}$
26 changes: 24 additions & 2 deletions openapi/components/schemas/common/BrlBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
Expand Down Expand Up @@ -30,4 +29,27 @@ properties:
type: string
description: The country of residence of the beneficiary
address:
$ref: ./Address.yaml
type: object
required:
- country
- line1
- postalCode
properties:
line1:
type: string
description: Address line 1
postalCode:
type: string
description: Postal code
country:
type: string
description: Country code
line2:
type: string
description: Address line 2
city:
type: string
description: City
state:
type: string
description: State or province
12 changes: 10 additions & 2 deletions openapi/components/schemas/common/DkkAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ properties:
- SEPA_INSTANT
iban:
type: string
description: The IBAN of the bank
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}$
swiftBic:
type: string
description: The SWIFT BIC of the bank
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})?$
26 changes: 24 additions & 2 deletions openapi/components/schemas/common/DkkBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
Expand Down Expand Up @@ -30,4 +29,27 @@ properties:
type: string
description: The country of residence of the beneficiary
address:
$ref: ./Address.yaml
type: object
required:
- country
- line1
- postalCode
properties:
line1:
type: string
description: Address line 1
postalCode:
type: string
description: Postal code
country:
type: string
description: Country code
line2:
type: string
description: Address line 2
city:
type: string
description: City
state:
type: string
description: State or province
12 changes: 10 additions & 2 deletions openapi/components/schemas/common/EurAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ properties:
- SEPA_INSTANT
iban:
type: string
description: The IBAN of the bank
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}$
swiftBic:
type: string
description: The SWIFT BIC of the bank
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})?$
26 changes: 24 additions & 2 deletions openapi/components/schemas/common/EurBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
Expand Down Expand Up @@ -30,4 +29,27 @@ properties:
type: string
description: The country of residence of the beneficiary
address:
$ref: ./Address.yaml
type: object
required:
- country
- line1
- postalCode
properties:
line1:
type: string
description: Address line 1
postalCode:
type: string
description: Postal code
country:
type: string
description: Country code
line2:
type: string
description: Address line 2
city:
type: string
description: City
state:
type: string
description: State or province
16 changes: 8 additions & 8 deletions openapi/components/schemas/common/GbpAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ properties:
- FASTER_PAYMENTS
sortCode:
type: string
description: UK bank sort code (6 digits, may include hyphens)
example: '20-00-00'
pattern: '^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$'
description: The UK sort code
example: '123456'
minLength: 6
maxLength: 6
pattern: ^[0-9]{6}$
accountNumber:
type: string
description: UK bank account number (8 digits)
example: '12345678'
minLength: 8
maxLength: 8
pattern: ^[0-9]{8}$
description: The account number of the bank
minLength: 1
maxLength: 34
Comment on lines 18 to +29
Copy link
Contributor

Choose a reason for hiding this comment

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

Breaking change to sort code pattern and loosened account number validation

Two changes here deserve attention:

  1. Sort code pattern changed from '^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$' (allowing XX-XX-XX hyphenated format) to ^[0-9]{6}$ (digits only). The old spec explicitly documented "may include hyphens" and the example was '20-00-00'. Any existing client sending sort codes in the common hyphenated format will now fail validation. This is a breaking change for clients relying on the documented format.

  2. Account number validation removed: UK account numbers are always exactly 8 digits. The previous schema correctly enforced pattern: ^[0-9]{8}$ with minLength: 8, maxLength: 8. The new schema accepts 1–34 characters with no pattern, which would silently accept invalid account numbers.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/GbpAccountInfo.yaml
Line: 18-29

Comment:
**Breaking change to sort code pattern and loosened account number validation**

Two changes here deserve attention:

1. **Sort code pattern** changed from `'^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$'` (allowing `XX-XX-XX` hyphenated format) to `^[0-9]{6}$` (digits only). The old spec explicitly documented "may include hyphens" and the example was `'20-00-00'`. Any existing client sending sort codes in the common hyphenated format will now fail validation. This is a breaking change for clients relying on the documented format.

2. **Account number validation removed**: UK account numbers are always exactly 8 digits. The previous schema correctly enforced `pattern: ^[0-9]{8}$` with `minLength: 8, maxLength: 8`. The new schema accepts 1–34 characters with no pattern, which would silently accept invalid account numbers.

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

26 changes: 24 additions & 2 deletions openapi/components/schemas/common/GbpBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
Expand Down Expand Up @@ -30,4 +29,27 @@ properties:
type: string
description: The country of residence of the beneficiary
address:
$ref: ./Address.yaml
type: object
required:
- country
- line1
- postalCode
properties:
line1:
type: string
description: Address line 1
postalCode:
type: string
description: Postal code
country:
type: string
description: Country code
line2:
type: string
description: Address line 2
city:
type: string
description: City
state:
type: string
description: State or province
25 changes: 17 additions & 8 deletions openapi/components/schemas/common/HkdAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ type: object
required:
- accountType
- paymentRails
- bankCode
- bankName
- accountNumber
- swiftCode
- swiftBic
Copy link
Contributor

Choose a reason for hiding this comment

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

Breaking field rename: swiftCodeswiftBic

The required field swiftCode has been renamed to swiftBic without a deprecation period. Any existing API consumers that submit or receive swiftCode in their requests/responses will now fail schema validation. This is a backwards-incompatible change across six schemas:

  • HkdAccountInfo.yaml (line 8)
  • IdrAccountInfo.yaml
  • MyrAccountInfo.yaml
  • SgdAccountInfo.yaml
  • ThbAccountInfo.yaml
  • VndAccountInfo.yaml

Per backwards-compatibility practices, the safe migration path would be to:

  1. Add swiftBic as a new (initially optional) field while keeping swiftCode
  2. Deprecate swiftCode
  3. After a suitable notice period, make swiftBic required and remove swiftCode

If this schema is synced from sparkcore and the implementation already accepts both field names, ensure that is reflected here as well.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/HkdAccountInfo.yaml
Line: 8

Comment:
**Breaking field rename: `swiftCode``swiftBic`**

The required field `swiftCode` has been renamed to `swiftBic` without a deprecation period. Any existing API consumers that submit or receive `swiftCode` in their requests/responses will now fail schema validation. This is a backwards-incompatible change across six schemas:

- `HkdAccountInfo.yaml` (line 8)
- `IdrAccountInfo.yaml`
- `MyrAccountInfo.yaml`
- `SgdAccountInfo.yaml`
- `ThbAccountInfo.yaml`
- `VndAccountInfo.yaml`

Per backwards-compatibility practices, the safe migration path would be to:
1. Add `swiftBic` as a new (initially optional) field while keeping `swiftCode`
2. Deprecate `swiftCode`
3. After a suitable notice period, make `swiftBic` required and remove `swiftCode`

If this schema is synced from sparkcore and the implementation already accepts both field names, ensure that is reflected here as well.

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

properties:
accountType:
type: string
Expand All @@ -16,18 +17,26 @@ properties:
type: string
enum:
- BANK_TRANSFER
bankCode:
type: string
description: The bank code
minLength: 3
maxLength: 3
pattern: ^[0-9]{3}$
bankName:
type: string
description: Name of the bank
example: HSBC Hong Kong
description: The name of the bank
minLength: 1
maxLength: 255
accountNumber:
type: string
description: Hong Kong bank account number
example: '123456789012'
swiftCode:
description: The account number of the bank
minLength: 1
maxLength: 34
swiftBic:
type: string
description: SWIFT/BIC code (8 or 11 characters)
example: HSBCHKHHHKH
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})?$
26 changes: 24 additions & 2 deletions openapi/components/schemas/common/HkdBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
Expand Down Expand Up @@ -30,4 +29,27 @@ properties:
type: string
description: The country of residence of the beneficiary
address:
$ref: ./Address.yaml
type: object
required:
- country
- line1
- postalCode
properties:
line1:
type: string
description: Address line 1
postalCode:
type: string
description: Postal code
country:
type: string
description: Country code
line2:
type: string
description: Address line 2
city:
type: string
description: City
state:
type: string
description: State or province
32 changes: 18 additions & 14 deletions openapi/components/schemas/common/IdrAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ type: object
required:
- accountType
- paymentRails
- accountNumber
- bankName
- swiftCode
- accountNumber
- swiftBic
- phoneNumber
properties:
accountType:
Expand All @@ -17,23 +17,27 @@ properties:
type: string
enum:
- BANK_TRANSFER
accountNumber:
type: string
description: Indonesian bank account number
example: '1234567890'
bankName:
type: string
description: Name of the bank
example: Bank Central Asia
swiftCode:
description: The name of the bank
minLength: 1
maxLength: 255
accountNumber:
type: string
description: The account number of the bank
minLength: 1
maxLength: 34
swiftBic:
type: string
description: SWIFT/BIC code (8 or 11 characters)
example: CENAIDJA
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: Indonesian phone number for e-wallet payments
example: '+6281234567890'
pattern: ^\+62[0-9]{9,12}$
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$
26 changes: 24 additions & 2 deletions openapi/components/schemas/common/IdrBeneficiary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
title: Individual Beneficiary
type: object
required:
- beneficiaryType
Expand Down Expand Up @@ -30,4 +29,27 @@ properties:
type: string
description: The country of residence of the beneficiary
address:
$ref: ./Address.yaml
type: object
required:
- country
- line1
- postalCode
properties:
line1:
type: string
description: Address line 1
postalCode:
type: string
description: Postal code
country:
type: string
description: Country code
line2:
type: string
description: Address line 2
city:
type: string
description: City
state:
type: string
description: State or province
7 changes: 6 additions & 1 deletion openapi/components/schemas/common/InrAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ properties:
type: string
enum:
- UPI
- IMPS
Copy link
Contributor

Choose a reason for hiding this comment

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

IMPS rail added without required supporting fields

IMPS has been added as a valid paymentRails value, but the schema only defines vpa (Virtual Payment Address) as an account identifier — which is UPI-specific. IMPS payments require different identifiers: an account number and an IFSC code. Without those fields in the schema, there is no valid way for an API consumer to provide the necessary data when using the IMPS rail.

Either:

  1. Add the required accountNumber and ifscCode fields (conditionally required when paymentRails includes IMPS), or
  2. Consider a separate InrImpsAccountInfo schema if the field set is substantially different from the UPI flow.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/InrAccountInfo.yaml
Line: 17

Comment:
**IMPS rail added without required supporting fields**

`IMPS` has been added as a valid `paymentRails` value, but the schema only defines `vpa` (Virtual Payment Address) as an account identifier — which is UPI-specific. IMPS payments require different identifiers: an account number and an IFSC code. Without those fields in the schema, there is no valid way for an API consumer to provide the necessary data when using the `IMPS` rail.

Either:
1. Add the required `accountNumber` and `ifscCode` fields (conditionally required when `paymentRails` includes `IMPS`), or
2. Consider a separate `InrImpsAccountInfo` schema if the field set is substantially different from the UPI flow.

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

vpa:
type: string
description: The VPA of the bank
description: The UPI Virtual Payment Address
example: user@upi
minLength: 3
maxLength: 255
pattern: ^[a-zA-Z0-9.\-_]+@[a-zA-Z0-9]+$
Loading
Loading