[update]: Swagger documentation and responses

This commit is contained in:
VivianDee
2025-03-25 08:52:33 +01:00
parent 3e18c2b1cc
commit 0d87c82e3b
19 changed files with 153 additions and 99 deletions
+7 -7
View File
@@ -44,7 +44,7 @@
}
},
{
"name": "LoanInformation",
"name": "LoanStatus",
"description": "Loan Information Request.",
"externalDocs": {
"description": "Find out more",
@@ -86,8 +86,8 @@
"/ProvideLoan": {
"$ref": "swagger/paths/ProvideLoan.json"
},
"/LoanInformation": {
"$ref": "swagger/paths/LoanInformation.json"
"/LoanStatus": {
"$ref": "swagger/paths/LoanStatus.json"
},
"/Repayment": {
"$ref": "swagger/paths/Repayment.json"
@@ -113,11 +113,11 @@
"SelectOfferResponse": {
"$ref": "swagger/schemas/SelectOfferResponse.json"
},
"LoanInformationRequest": {
"$ref": "swagger/schemas/LoanInformationRequest.json"
"LoanStatusRequest": {
"$ref": "swagger/schemas/LoanStatusRequest.json"
},
"LoanInformationResponse": {
"$ref": "swagger/schemas/LoanInformationResponse.json"
"LoanStatusResponse": {
"$ref": "swagger/schemas/LoanStatusResponse.json"
},
"RepaymentRequest": {
"$ref": "swagger/schemas/RepaymentRequest.json"
@@ -1,27 +1,27 @@
{
"get": {
"post": {
"tags": [
"LoanInformation"
"LoanStatus"
],
"summary": "Loan Information Request ",
"description": "Loan Information Request",
"operationId": "LoanInformation",
"operationId": "LoanStatus",
"requestBody": {
"description": "Post JSON to conduct eligibility tests",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/LoanInformationRequest.json"
"$ref": "../schemas/LoanStatusRequest.json"
}
},
"application/xml": {
"schema": {
"$ref": "../schemas/LoanInformationRequest.json"
"$ref": "../schemas/LoanStatusRequest.json"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "../schemas/LoanInformationRequest.json"
"$ref": "../schemas/LoanStatusRequest.json"
}
}
},
@@ -33,12 +33,12 @@
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/LoanInformationResponse.json"
"$ref": "../schemas/LoanStatusResponse.json"
}
},
"application/xml": {
"schema": {
"$ref": "../schemas/LoanInformationResponse.json"
"$ref": "../schemas/LoanStatusResponse.json"
}
}
}
+5 -5
View File
@@ -11,17 +11,17 @@
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/LoanInformationRequest.json"
"$ref": "../schemas/NotificationCallbackRequest.json"
}
},
"application/xml": {
"schema": {
"$ref": "../schemas/LoanInformationRequest.json"
"$ref": "../schemas/NotificationCallbackRequest.json"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "../schemas/LoanInformationRequest.json"
"$ref": "../schemas/NotificationCallbackRequest.json"
}
}
},
@@ -33,12 +33,12 @@
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/LoanInformationResponse.json"
"$ref": "../schemas/NotificationCallbackResponse.json"
}
},
"application/xml": {
"schema": {
"$ref": "../schemas/LoanInformationResponse.json"
"$ref": "../schemas/NotificationCallbackResponse.json"
}
}
}
+5 -5
View File
@@ -11,17 +11,17 @@
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/EligibilityCheckRequest.json"
"$ref": "../schemas/ProvideLoanRequest.json"
}
},
"application/xml": {
"schema": {
"$ref": "../schemas/EligibilityCheckRequest.json"
"$ref": "../schemas/ProvideLoanRequest.json"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "../schemas/EligibilityCheckRequest.json"
"$ref": "../schemas/ProvideLoanRequest.json"
}
}
},
@@ -33,12 +33,12 @@
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/EligibilityCheckResponse.json"
"$ref": "../schemas/ProvideLoanResponse.json"
}
},
"application/xml": {
"schema": {
"$ref": "../schemas/EligibilityCheckResponse.json"
"$ref": "../schemas/ProvideLoanResponse.json"
}
}
}
@@ -1,7 +1,7 @@
{
"type": "object",
"properties": {
"$type": {
"type": {
"type": "string",
"example": "CustomerConsentRequest"
},
@@ -1,28 +0,0 @@
{
"type": "object",
"properties": {
"transactionId": {
"type": "string",
"example": "Tr201712RK9232P115"
},
"resultDescription": {
"type": "string",
"example": "Successful"
},
"resultCode": {
"type": "string",
"example": "00"
},
"customerId": {
"type": "string",
"example": "CN621868"
},
"loan": {
"type": "string",
"example": "Arrray of loans"
}
},
"xml": {
"name": "LoanInformationResponse"
}
}
@@ -5,10 +5,6 @@
"type": "string",
"example": "Tr201712RK9232P115"
},
"resultDescription": {
"type": "string",
"example": "Successful"
},
"customerId": {
"type": "string",
"example": "CN621868"
@@ -23,6 +19,6 @@
}
},
"xml": {
"name": "LoanInformationRequest"
"name": "LoanStatusRequest"
}
}
@@ -0,0 +1,70 @@
{
"type": "object",
"properties": {
"customerId": {
"type": "string",
"example": "CN621868"
},
"transactionId": {
"type": "string",
"example": "Tr201712RK9232P115"
},
"loans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"debtId": {
"type": "string",
"example": "123456789"
},
"loanDate": {
"type": "string",
"format": "date-time",
"example": "2019-10-18 14:26:21.063"
},
"dueDate": {
"type": "string",
"format": "date-time",
"example": "2019-11-20 14:26:21.063"
},
"currentLoanAmount": {
"type": "integer",
"example": 8500
},
"initialLoanAmount": {
"type": "integer",
"example": 10000
},
"defaultPenaltyFee": {
"type": "integer",
"example": 0
},
"continuousFee": {
"type": "integer",
"example": 0
},
"productId": {
"type": "string",
"example": "101"
}
}
}
},
"totalDebtAmount": {
"type": "integer",
"example": 8500
},
"resultCode": {
"type": "string",
"example": "00"
},
"resultDescription": {
"type": "string",
"example": "Successful"
}
},
"xml": {
"name": "LoanStatusResponse"
}
}
+15 -6
View File
@@ -1,26 +1,35 @@
{
"type": "object",
"properties": {
"transactionId": {
"requestId": {
"type": "string",
"example": "202111170001371256908"
},
"accountId": {
"transactionId": {
"type": "string",
"example": "ACN8263457"
"example": "Tr201712RK9232P115"
},
"customerId": {
"type": "string",
"example": "CN621868"
},
"accountId": {
"type": "string",
"example": "ACN8263457"
},
"msisdn": {
"type": "string",
"example": "9012345678"
"example": "3451342"
},
"productId": {
"type": "string",
"example": "101"
},
"lienAmount": {
"type": "number",
"format": "decimal",
"example": 400
},
"requestedAmount": {
"type": "number",
"format": "decimal",
@@ -30,13 +39,13 @@
"type": "integer",
"example": 1
},
"offerID": {
"loanType": {
"type": "integer",
"example": 0
},
"channel": {
"type": "string",
"example": "100"
"example": "USSD"
}
},
"xml": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"type": "object",
"properties": {
"$type": {
"type": {
"type": "string",
"example": "RepaymentRequest"
},