Skip to content

Commit

Permalink
Merge pull request #15 from mojaloop/feat/code-quality-healthCheck
Browse files Browse the repository at this point in the history
feat: added healthCheck; improved routes validation; added PartyInfo swagger schema
  • Loading branch information
geka-evk authored Mar 21, 2024
2 parents 3462e97 + 95600b5 commit 8faca1c
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ module.exports = {
node: true,
jest: true,
},
ignorePatterns: ['test/func/**', 'test/mocks/**'], // todo: enable eslint for tests
ignorePatterns: ['test/func/**'], // todo: enable eslint for tests
};
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mojaloop/payment-token-adapter",
"version": "1.4.0",
"version": "1.5.0",
"description": "An adapter that facilitates payment token mapping between a Mojaloop Connector (SDK Scheme Adapter) and a Core Banking system Connector to support G2P payments",
"main": "dist/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/api-spec/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ components:
- ACCOUNT_ID
- IBAN
- ALIAS
description: 'Type of Id'
296 changes: 65 additions & 231 deletions src/api-spec/payment-token-adapter-spec-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ paths:
in: path
required: true
schema:
$ref: 'common.yaml#/components/schemas/IdType'
$ref: '#/components/schemas/IdType'
- name: ID
in: path
required: true
Expand All @@ -32,54 +32,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
dateOfBirth:
type: string
description: 'Date Of Birth'
displayName:
type: string
description: 'Display Name'
extensionList:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
description: "Extension List"
firstName:
type: string
description: 'First Name'
fspId:
type: string
description: 'FSP Id'
idSubValue:
type: string
description: 'Id Sub Value'
idType:
type: string
description: 'Type of Id'
idValue:
type: string
description: 'ID Value'
lastName:
type: string
merchantClassificationCode:
type: string
middleName:
type: string
type:
type: string
supportedCurrencies:
type: array
items:
type: string
kycInformation:
type: string

$ref: '#/components/schemas/PartyInfo'
description: 'Response containing details of the requested party'
tags:
- Discovery
Expand All @@ -96,6 +49,9 @@ paths:
application/json:
schema:
type: object
required:
- to
# todo: add other required fields
properties:
homeR2PTransactionId:
type: string
Expand Down Expand Up @@ -128,51 +84,9 @@ paths:
type: string
example: "AED"
from:
type: object
properties:
dateOfBirth:
type: string
example: "8477-05-21"
displayName:
type: string
extensionList:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
firstName:
type: string
description: 'First Name'
fspId:
type: string
description: 'FSP Id'
idSubValue:
type: string
description: 'Id Sub Value'
idType:
type: string
description: 'Type of Id'
idValue:
type: string
description: 'ID Value'
lastName:
type: string
merchantClassificationCode:
type: string
middleName:
type: string
type:
type: string
supportedCurrencies:
type: array
items:
type: string
kycInformation:
type: string
$ref: '#/components/schemas/PartyInfo'
to:
$ref: '#/components/schemas/PartyInfo'
geoCode:
type: object
properties:
Expand All @@ -193,52 +107,6 @@ paths:
example: "3cc5bf26-5462-34bb-b198-0b8f1569da4f"
subScenario:
type: string
to:
type: object
properties:
dateOfBirth:
type: string
example: "8477-05-21"
displayName:
type: string
extensionList:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
firstName:
type: string
description: 'First Name'
fspId:
type: string
description: 'FSP Id'
idSubValue:
type: string
description: 'Id Sub Value'
idType:
type: string
description: 'Type of Id'
idValue:
type: string
description: 'ID Value'
lastName:
type: string
merchantClassificationCode:
type: string
middleName:
type: string
type:
type: string
supportedCurrencies:
type: array
items:
type: string
kycInformation:
type: string
transactionId:
type: string
example: "1eea8954-271b-2dcf-98d4-7cb8a426a279"
Expand Down Expand Up @@ -323,6 +191,8 @@ paths:
application/json:
schema:
type: object
required:
- to
properties:
homeR2PTransactionId:
type: string
Expand All @@ -337,51 +207,9 @@ paths:
type: string
example: 'AED'
from:
type: object
properties:
dateOfBirth:
type: string
example: "8477-05-21"
displayName:
type: string
extensionList:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
firstName:
type: string
description: 'First Name'
fspId:
type: string
description: 'FSP Id'
idSubValue:
type: string
description: 'Id Sub Value'
idType:
type: string
description: 'Type of Id'
idValue:
type: string
description: 'ID Value'
lastName:
type: string
merchantClassificationCode:
type: string
middleName:
type: string
type:
type: string
supportedCurrencies:
type: array
items:
type: string
kycInformation:
type: string
$ref: '#/components/schemas/PartyInfo'
to:
$ref: '#/components/schemas/PartyInfo'
ilpPacket:
type: object
properties:
Expand Down Expand Up @@ -495,52 +323,6 @@ paths:
type: string
subScenario:
type: string
to:
type: object
properties:
dateOfBirth:
type: string
example: "8477-05-21"
displayName:
type: string
extensionList:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
firstName:
type: string
description: 'First Name'
fspId:
type: string
description: 'FSP Id'
idSubValue:
type: string
description: 'Id Sub Value'
idType:
type: string
description: 'Type of Id'
idValue:
type: string
description: 'ID Value'
lastName:
type: string
merchantClassificationCode:
type: string
middleName:
type: string
type:
type: string
supportedCurrencies:
type: array
items:
type: string
kycInformation:
type: string
transactionType:
type: string
transferId:
Expand All @@ -565,5 +347,57 @@ paths:
type: string


components:
schemas:
IdType:
$ref: 'common.yaml#/components/schemas/IdType'

PartyInfo:
type: object
required:
- idType
- idValue
properties:
dateOfBirth:
type: string
example: "8477-05-21"
displayName:
type: string
extensionList:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
firstName:
type: string
description: 'First Name'
fspId:
type: string
description: 'FSP Id'
idSubValue:
type: string
description: 'Id Sub Value'
idType:
$ref: '#/components/schemas/IdType'
idValue:
type: string
description: 'ID Value'
lastName:
type: string
merchantClassificationCode:
type: string
middleName:
type: string
type:
type: string
supportedCurrencies:
type: array
items:
type: string
kycInformation:
type: string

Loading

0 comments on commit 8faca1c

Please sign in to comment.