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(mojaloop/3483): add fx apis #169

Merged
merged 22 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from 16 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
4,859 changes: 4,859 additions & 0 deletions docs/fspiop-rest-v2.0-openapi3-snippets.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
urls: [
{url: "fspiop-rest-v1.0-openapi3-snippets.yaml", name: "v1.0"},
{url: "fspiop-rest-v1.1-openapi3-snippets.yaml", name: "v1.1"},
{url: "fspiop-rest-v2.0-openapi3-snippets.yaml", name: "v2.0"},
{url: "thirdparty-openapi3-snippets.yaml", name: "thirdparty"},
],
dom_id: '#swagger-ui',
Expand Down
9 changes: 9 additions & 0 deletions fspiop/v2_0/openapi3/components/headers/Content-Length.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
required: false
schema:
type: integer
description: >-
The `Content-Length` header field indicates the anticipated size of the
payload body. Only sent if there is a body.


**Note:** The API supports a maximum size of 5242880 bytes (5 Megabytes).
6 changes: 6 additions & 0 deletions fspiop/v2_0/openapi3/components/headers/Content-Type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
schema:
type: string
required: true
description: >-
The `Content-Type` header indicates the specific version of the API used to
send the payload body.
8 changes: 8 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/Accept.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Accept
in: header
required: true
schema:
type: string
description: >-
The `Accept` header field indicates the version of the API the client would
like the server to use.
11 changes: 11 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/Content-Length.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Content-Length
in: header
required: false
schema:
type: integer
description: >-
The `Content-Length` header field indicates the anticipated size of the
payload body. Only sent if there is a body.


**Note:** The API supports a maximum size of 5242880 bytes (5 Megabytes).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Content-Type
in: header
schema:
type: string
required: true
description: >-
The `Content-Type` header indicates the specific version of the API used to
send the payload body.
6 changes: 6 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/Date.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Date
in: header
schema:
type: string
required: true
description: The `Date` header field indicates the date when the request was sent.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: FSPIOP-Destination
in: header
schema:
type: string
required: false
description: >-
The `FSPIOP-Destination` header field is a non-HTTP standard field used by the
API for HTTP header based routing of requests and responses to the
destination. The field must be set by the original sender of the request if
the destination is known (valid for all services except GET /parties) so that
any entities between the client and the server do not need to parse the
payload for routing purposes. If the destination is not known (valid for
service GET /parties), the field should be left empty.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: FSPIOP-Encryption
in: header
schema:
type: string
required: false
description: >-
The `FSPIOP-Encryption` header field is a non-HTTP standard field used by the
API for applying end-to-end encryption of the request.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: FSPIOP-HTTP-Method
in: header
schema:
type: string
required: false
description: >-
The `FSPIOP-HTTP-Method` header field is a non-HTTP standard field used by the
API for signature verification, should contain the service HTTP method.
Required if signature verification is used, for more information, see [the API
Signature
document](https://github.com/mojaloop/docs/tree/main/Specification%20Document%20Set).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: FSPIOP-Signature
in: header
schema:
type: string
required: false
description: >-
The `FSPIOP-Signature` header field is a non-HTTP standard field used by the
API for applying an end-to-end request signature.
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/FSPIOP-Source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: FSPIOP-Source
in: header
schema:
type: string
required: true
description: >-
The `FSPIOP-Source` header field is a non-HTTP standard field used by the API
for identifying the sender of the HTTP request. The field should be set by the
original sender of the request. Required for routing and signature
verification (see header field `FSPIOP-Signature`).
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/FSPIOP-URI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: FSPIOP-URI
in: header
schema:
type: string
required: false
description: >-
The `FSPIOP-URI` header field is a non-HTTP standard field used by the API for
signature verification, should contain the service URI. Required if signature
verification is used, for more information, see [the API Signature
document](https://github.com/mojaloop/docs/tree/main/Specification%20Document%20Set).
6 changes: 6 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/ID.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: ID
in: path
required: true
schema:
type: string
description: The identifier value.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: SourceCurrency
in: path
required: true
schema:
type: string
description: ISO 4217 currency code for the source currency.
8 changes: 8 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/SubId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: SubId
in: path
required: true
schema:
type: string
description: >-
A sub-identifier of the party identifier, or a sub-type of the party
identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: TargetCurrency
in: path
required: true
schema:
type: string
description: ISO 4217 currency code for the target currency.
6 changes: 6 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/Type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Type
in: path
required: true
schema:
type: string
description: 'The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`.'
15 changes: 15 additions & 0 deletions fspiop/v2_0/openapi3/components/parameters/X-Forwarded-For.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: X-Forwarded-For
in: header
schema:
type: string
required: false
description: >-
The `X-Forwarded-For` header field is an unofficially accepted standard used
for informational purposes of the originating client IP address, as a request
might pass multiple proxies, firewalls, and so on. Multiple `X-Forwarded-For`
values should be expected and supported by implementers of the API.


**Note:** An alternative to `X-Forwarded-For` is defined in [RFC
7239](https://tools.ietf.org/html/rfc7239). However, to this point RFC 7239 is
less-used and supported than `X-Forwarded-For`.
1 change: 1 addition & 0 deletions fspiop/v2_0/openapi3/components/responses/200.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
description: OK
1 change: 1 addition & 0 deletions fspiop/v2_0/openapi3/components/responses/202.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
description: Accepted
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/400.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Bad Request
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/401.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Unauthorized
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/403.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Forbidden
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/404.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Not Found
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/405.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Method Not Allowed
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/406.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Not Acceptable
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/501.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Not Implemented
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
10 changes: 10 additions & 0 deletions fspiop/v2_0/openapi3/components/responses/503.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Service Unavailable
content:
application/json:
schema:
$ref: ../schemas/ErrorInformationResponse.yaml
headers:
Content-Length:
$ref: ../headers/Content-Length.yaml
Content-Type:
$ref: ../headers/Content-Type.yaml
11 changes: 11 additions & 0 deletions fspiop/v2_0/openapi3/components/schemas/Amount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: Amount
type: string
pattern: '^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$'
description: >-
The API data type Amount is a JSON String in a canonical format that is
restricted by a regular expression for interoperability reasons. This pattern
does not allow any trailing zeroes at all, but allows an amount without a
minor currency unit. It also only allows four digits in the minor currency
unit; a negative value is not allowed. Using more than 18 digits in the major
currency unit is not allowed.
example: '123.45'
14 changes: 14 additions & 0 deletions fspiop/v2_0/openapi3/components/schemas/AmountType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: AmountType
type: string
enum:
- SEND
- RECEIVE
description: >-
Below are the allowed values for the enumeration AmountType.

- SEND - Amount the Payer would like to send, that is, the amount that should
be withdrawn from the Payer account including any fees.

- RECEIVE - Amount the Payer would like the Payee to receive, that is, the
amount that should be sent to the receiver exclusive of any fees.
example: 'RECEIVE'
11 changes: 11 additions & 0 deletions fspiop/v2_0/openapi3/components/schemas/AuthenticationInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: AuthenticationInfo
type: object
description: Data model for the complex type AuthenticationInfo.
properties:
authentication:
$ref: ./AuthenticationType.yaml
authenticationValue:
$ref: ./AuthenticationValue.yaml
required:
- authentication
- authenticationValue
12 changes: 12 additions & 0 deletions fspiop/v2_0/openapi3/components/schemas/AuthenticationType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
title: AuthenticationType
type: string
enum:
- OTP
- QRCODE
- U2F
description: |-
Below are the allowed values for the enumeration AuthenticationType.
- OTP - One-time password generated by the Payer FSP.
- QRCODE - QR code used as One Time Password.
- U2F - U2F is a new addition isolated to Thirdparty stream.
example: 'OTP'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: AuthenticationValue
anyOf:
- $ref: ./OtpValue.yaml
- $ref: ./QRCODE.yaml
- $ref: ./U2FPinValue.yaml
pattern: '^\d{3,10}$|^\S{1,64}$'
description: >-
Contains the authentication value. The format depends on the authentication
type used in the AuthenticationInfo complex type.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
title: AuthorizationResponse
type: string
enum:
- ENTERED
- REJECTED
- RESEND
description: |-
Below are the allowed values for the enumeration.
- ENTERED - Consumer entered the authentication value.
- REJECTED - Consumer rejected the transaction.
- RESEND - Consumer requested to resend the authentication value.
example: 'ENTERED'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: AuthorizationsIDPutResponse
type: object
description: 'The object sent in the PUT /authorizations/{ID} callback.'
properties:
authenticationInfo:
$ref: ./AuthenticationInfo.yaml
responseType:
$ref: ./AuthorizationResponse.yaml
required:
- responseType
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: BalanceOfPayments
type: string
pattern: '^[1-9]\d{2}$'
description: >-
(BopCode) The API data type
[BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String of 3
characters, consisting of digits only. Negative numbers are not allowed. A
leading zero is not allowed.
example: '123'
7 changes: 7 additions & 0 deletions fspiop/v2_0/openapi3/components/schemas/BinaryString.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: string
pattern: '^[A-Za-z0-9-_]+[=]{0,2}$'
description: >-
The API data type BinaryString is a JSON String. The string is a base64url
encoding of a string of raw bytes, where padding (character ‘=’) is added at
the end of the data if needed to ensure that the string is a multiple of 4
characters. The length restriction indicates the allowed number of characters.
7 changes: 7 additions & 0 deletions fspiop/v2_0/openapi3/components/schemas/BinaryString32.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: string
pattern: '^[A-Za-z0-9-_]{43}$'
description: >-
The API data type BinaryString32 is a fixed size version of the API data type
BinaryString, where the raw underlying data is always of 32 bytes. The data
type BinaryString32 should not use a padding character as the size of the
underlying data is fixed.
Loading