[add]: eco endpoints and dummy responses
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "bank Emulator Swagger Simbrella EcoBank - OpenAPI 3.0",
|
||||
"description": "This is a Simbrella EcoBank bank Backend Server Emulator with the OpenAPI 3.0 specification. \n\n\nSome useful links:\n- [Web Simulated Demo Page](https://digifi-salaryloan.chiefsoft.net/)\n- [Web Management Support Portal](https://digifi-office.chiefsoft.net/auth/login)",
|
||||
"termsOfService": "http://swagger.io/terms/",
|
||||
"contact": {
|
||||
"email": "support@chiefsoft.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "1.0.11"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:6337"
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:5000"
|
||||
},
|
||||
{
|
||||
"url": "http://10.10.11.17:6337"
|
||||
},
|
||||
{
|
||||
"url": "https://bank-emulator.dev.simbrellang.net"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "Authentication",
|
||||
"description": "EcoBank Authentication Token Request",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Disbursement",
|
||||
"description": "Loan Disbursement Request to EcoBank",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CollectLoan",
|
||||
"description": "Collect Loan Repayment from EcoBank Customer",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DebtClosureNotification",
|
||||
"description": "Notify EcoBank of Loan Closure",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SendSMS",
|
||||
"description": "Send SMS to EcoBank Customers",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/eco/Authorize": {
|
||||
"$ref": "swagger/paths/eco/Authentication.json"
|
||||
},
|
||||
"/eco/Disbursement": {
|
||||
"$ref": "swagger/paths/eco/Disbursement.json"
|
||||
},
|
||||
"/eco/CollectLoan": {
|
||||
"$ref": "swagger/paths/eco/CollectLoan.json"
|
||||
},
|
||||
"/eco/DebtClosureNotification": {
|
||||
"$ref": "swagger/paths/eco/DebtClosureNotification.json"
|
||||
},
|
||||
"/eco/SendSMS": {
|
||||
"$ref": "swagger/paths/eco/SendSMS.json"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"AuthenticationRequest": {
|
||||
"$ref": "./schemas/eco/AuthenticationRequest.json"
|
||||
},
|
||||
"AuthenticationResponse": {
|
||||
"$ref": "./schemas/eco/AuthenticationResponse.json"
|
||||
},
|
||||
"DebtClosureNotificationRequest": {
|
||||
"$ref": "./schemas/eco/DebtClosureNotificationRequest.json"
|
||||
},
|
||||
"DebtClosureNotificationResponse": {
|
||||
"$ref": "./schemas/eco/DebtClosureNotificationResponse.json"
|
||||
},
|
||||
"SendSMSRequest": {
|
||||
"$ref": "./schemas/eco/SendSMSRequest.json"
|
||||
},
|
||||
"SendSMSResponse": {
|
||||
"$ref": "./schemas/eco/SendSMSResponse.json"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"basicAuth": {
|
||||
"type": "http",
|
||||
"scheme": "basic"
|
||||
},
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"basicAuth": [],
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"post": {
|
||||
"tags": ["Authentication"],
|
||||
"summary": "EcoBank Authentication",
|
||||
"description": "Get bearer token from EcoBank",
|
||||
"operationId": "authenticate",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/AuthenticationRequest.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Authentication Successful",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/AuthenticationResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": { "description": "Invalid request" },
|
||||
"500": { "description": "Internal server error" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"post": {
|
||||
"tags": ["CollectLoan"],
|
||||
"summary": "Collect Loan Repayment",
|
||||
"description": "Collect repayment amount from EcoBank customer",
|
||||
"operationId": "collectLoan",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/CollectLoanRequest.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Loan Collection Successful",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/CollectLoanResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": { "description": "Invalid request" },
|
||||
"422": { "description": "Validation exception" },
|
||||
"500": { "description": "Internal server error" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"post": {
|
||||
"tags": ["DebtClosureNotification"],
|
||||
"summary": "Debt Closure Notification",
|
||||
"description": "Notify EcoBank that debt has been fully repaid",
|
||||
"operationId": "notifyDebtClosure",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/DebtClosureNotificationRequest.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Debt Closure Acknowledged",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/DebtClosureNotificationResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": { "description": "Invalid request" },
|
||||
"422": { "description": "Validation exception" },
|
||||
"500": { "description": "Internal server error" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"post": {
|
||||
"tags": ["Disbursement"],
|
||||
"summary": "Loan Disbursement",
|
||||
"description": "Disburse loan to EcoBank customer account",
|
||||
"operationId": "disburseLoan",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/DisbursementRequest.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Disbursement Successful",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/DisbursementResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": { "description": "Invalid request" },
|
||||
"422": { "description": "Validation exception" },
|
||||
"500": { "description": "Internal server error" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"post": {
|
||||
"tags": ["SendSMS"],
|
||||
"summary": "Send SMS Notification",
|
||||
"description": "Send a message to one or more EcoBank customers",
|
||||
"operationId": "sendSms",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/SendSMSRequest.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "SMS Sent Successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../schemas/eco/SendSMSResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": { "description": "Invalid request" },
|
||||
"422": { "description": "Validation exception" },
|
||||
"500": { "description": "Internal server error" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["username", "password"],
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resultCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"resultDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["requestId", "affiliateCode", "debtId", "principal", "interest", "penalty", "collectAmount"],
|
||||
"properties": {
|
||||
"requestId": { "type": "string" },
|
||||
"affiliateCode": { "type": "string" },
|
||||
"debtId": { "type": "integer" },
|
||||
"principal": { "type": "number" },
|
||||
"interest": { "type": "number" },
|
||||
"penalty": { "type": "number" },
|
||||
"collectAmount": { "type": "number" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transactionId": { "type": "string" },
|
||||
"amountCollected": { "type": "number" },
|
||||
"resultCode": { "type": "integer" },
|
||||
"resultDescription": { "type": "string" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["requestId", "affiliateCode", "customerId", "accountId", "debtId"],
|
||||
"properties": {
|
||||
"requestId": { "type": "string" },
|
||||
"affiliateCode": { "type": "string" },
|
||||
"customerId": { "type": "string" },
|
||||
"accountId": { "type": "string" },
|
||||
"debtId": { "type": "integer" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resultCode": { "type": "integer" },
|
||||
"resultDescription": { "type": "string" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["requestId", "affiliateCode", "debtId", "productId", "customerId", "accountId", "provideAmount", "collectAmount", "interestRate"],
|
||||
"properties": {
|
||||
"requestId": { "type": "string" },
|
||||
"affiliateCode": { "type": "string" },
|
||||
"debtId": { "type": "integer" },
|
||||
"productId": { "type": "string" },
|
||||
"customerId": { "type": "string" },
|
||||
"accountId": { "type": "string" },
|
||||
"provideAmount": { "type": "number" },
|
||||
"collectAmount": { "type": "number" },
|
||||
"interestRate": { "type": "number" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transactionId": { "type": "string" },
|
||||
"resultCode": { "type": "integer" },
|
||||
"resultDescription": { "type": "string" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["requestId", "phoneNums", "affiliateCode", "message"],
|
||||
"properties": {
|
||||
"requestId": { "type": "string" },
|
||||
"phoneNums": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"affiliateCode": { "type": "string" },
|
||||
"message": { "type": "string" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"undelivered": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"resultCode": { "type": "integer" },
|
||||
"resultDescription": { "type": "string" }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user