Skip to content
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

feat: add ULID support #177

Merged
merged 12 commits into from
Oct 1, 2024
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

git update-index --again
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged; npm run test:unit
12 changes: 5 additions & 7 deletions docs/fspiop-rest-v2.0-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2918,14 +2918,12 @@ components:
title: CorrelationId
type: string
pattern: >-
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
description: >-
Identifier that correlates all messages of the same sequence. The API
data type UUID (Universally Unique Identifier) is a JSON String in
canonical format, conforming to [RFC
4122](https://tools.ietf.org/html/rfc4122), that is restricted by a
regular expression for interoperability reasons. A UUID is always 36
characters long, 32 hexadecimal symbols and 4 dashes (‘-‘).
Identifier that correlates all messages of the same sequence. The
supported identifiers formats are for lowercase
[UUID](https://datatracker.ietf.org/doc/html/rfc9562) and uppercase
[ULID](https://github.com/ulid/spec)
example: b51ec534-ee48-4575-b6a9-ead2955b8069
Currency:
title: Currency
Expand Down
26 changes: 13 additions & 13 deletions docs/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ components:
- RECEIVE
type: string
bulkQuoteId:
description: A Mojaloop API bulk quote identifier (UUID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: A Mojaloop API bulk quote identifier (UUID/ULID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
type: string
bulkQuoteRequest:
description: A request for a bulk quote.
Expand Down Expand Up @@ -719,8 +719,8 @@ components:
- individualQuoteResults
type: object
bulkTransferId:
description: A Mojaloop API transfer identifier (UUID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: A Mojaloop API transfer identifier (UUID/ULID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
type: string
bulkTransferRequest:
properties:
Expand Down Expand Up @@ -1162,8 +1162,8 @@ components:
- DEVICE
type: string
quoteId:
description: A Mojaloop API quote identifier (UUID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: A Mojaloop API quote identifier (UUID/ULID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
type: string
quoteRequest:
description: A request for a quote for transfer from the DFSP backend.
Expand Down Expand Up @@ -1275,7 +1275,7 @@ components:
type: string
transactionId:
description: ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote.
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
type: string
transactionRequest:
description: A request for a pull based transfer.
Expand Down Expand Up @@ -1320,8 +1320,8 @@ components:
- initiatorType
type: object
transactionRequestId:
description: A Mojaloop API transaction request identifier (UUID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: A Mojaloop API transaction request identifier (UUID/ULID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
type: string
transactionRequestResponse:
description: A response to a request for a quote.
Expand Down Expand Up @@ -1412,8 +1412,8 @@ components:
- timestamp
type: object
transferId:
description: A Mojaloop API transfer identifier (UUID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: A Mojaloop API transfer identifier (UUID/ULID).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
type: string
transferParty:
properties:
Expand Down Expand Up @@ -1603,8 +1603,8 @@ components:
CorrelationId:
title: CorrelationId
type: string
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
description: Identifier that correlates all messages of the same sequence. The supported identifiers formats are for lowercase [UUID](https://datatracker.ietf.org/doc/html/rfc9562) and uppercase [ULID](https://github.com/ulid/spec)
example: b51ec534-ee48-4575-b6a9-ead2955b8069
bulkTransactionStatus:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ components:
CorrelationId:
title: CorrelationId
type: string
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘).
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
description: Identifier that correlates all messages of the same sequence. The supported identifiers formats are for lowercase [UUID](https://datatracker.ietf.org/doc/html/rfc9562) and uppercase [ULID](https://github.com/ulid/spec)
example: b51ec534-ee48-4575-b6a9-ead2955b8069
errorResponse:
type: object
Expand Down
11 changes: 5 additions & 6 deletions fspiop/v2_0/openapi3/components/schemas/CorrelationId.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
title: CorrelationId
type: string
pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$'
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$
description: >-
Identifier that correlates all messages of the same sequence. The API data
type UUID (Universally Unique Identifier) is a JSON String in canonical
format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is
restricted by a regular expression for interoperability reasons. A UUID is
always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘).
Identifier that correlates all messages of the same sequence.
The supported identifiers formats are for
lowercase [UUID](https://datatracker.ietf.org/doc/html/rfc9562) and
uppercase [ULID](https://github.com/ulid/spec)
example: 'b51ec534-ee48-4575-b6a9-ead2955b8069'
Loading