[fix]: request schems

This commit is contained in:
VivianDee
2025-07-30 05:24:02 +01:00
parent 038c5323b0
commit 33ee8a286b
11 changed files with 51 additions and 47 deletions
+6 -6
View File
@@ -89,22 +89,22 @@
"components": {
"schemas": {
"AuthenticationRequest": {
"$ref": "./schemas/eco/AuthenticationRequest.json"
"$ref": "swagger/schemas/eco/AuthenticationRequest.json"
},
"AuthenticationResponse": {
"$ref": "./schemas/eco/AuthenticationResponse.json"
"$ref": "swagger/schemas/eco/AuthenticationResponse.json"
},
"DebtClosureNotificationRequest": {
"$ref": "./schemas/eco/DebtClosureNotificationRequest.json"
"$ref": "swagger/schemas/eco/DebtClosureNotificationRequest.json"
},
"DebtClosureNotificationResponse": {
"$ref": "./schemas/eco/DebtClosureNotificationResponse.json"
"$ref": "swagger/schemas/eco/DebtClosureNotificationResponse.json"
},
"SendSMSRequest": {
"$ref": "./schemas/eco/SendSMSRequest.json"
"$ref": "swagger/schemas/eco/SendSMSRequest.json"
},
"SendSMSResponse": {
"$ref": "./schemas/eco/SendSMSResponse.json"
"$ref": "swagger/schemas/eco/SendSMSResponse.json"
}
},
"securitySchemes": {
@@ -3,10 +3,12 @@
"required": ["username", "password"],
"properties": {
"username": {
"type": "string"
"type": "string",
"example": "user"
},
"password": {
"type": "string"
"type": "string",
"example": "password"
}
}
}
@@ -5,10 +5,12 @@
"type": "string"
},
"resultDescription": {
"type": "string"
"type": "string",
"example": "Authentication successful"
},
"token": {
"type": "string"
"type": "string",
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
}
@@ -2,12 +2,12 @@
"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" }
"requestId": { "type": "string", "example": "req-12345" },
"affiliateCode": { "type": "string", "example": "aff-67890" },
"debtId": { "type": "integer", "example": 123456 },
"principal": { "type": "number", "example": 1000.00 },
"interest": { "type": "number", "example": 100.00 },
"penalty": { "type": "number", "example": 50.00 },
"collectAmount": { "type": "number", "example": 1150.00 }
}
}
@@ -1,9 +1,9 @@
{
"type": "object",
"properties": {
"transactionId": { "type": "string" },
"amountCollected": { "type": "number" },
"resultCode": { "type": "integer" },
"resultDescription": { "type": "string" }
"transactionId": { "type": "string", "example": "txn-12345" },
"amountCollected": { "type": "number", "example": 1150.00 },
"resultCode": { "type": "integer", "example": 0 },
"resultDescription": { "type": "string", "example": "Collection successful" }
}
}
@@ -2,10 +2,10 @@
"type": "object",
"required": ["requestId", "affiliateCode", "customerId", "accountId", "debtId"],
"properties": {
"requestId": { "type": "string" },
"affiliateCode": { "type": "string" },
"customerId": { "type": "string" },
"accountId": { "type": "string" },
"debtId": { "type": "integer" }
"requestId": { "type": "string", "example": "req-12345" },
"affiliateCode": { "type": "string", "example": "aff-67890" },
"customerId": { "type": "string", "example": "cust-54321" },
"accountId": { "type": "string", "example": "acc-98765" },
"debtId": { "type": "integer", "example": 123456 }
}
}
@@ -1,7 +1,7 @@
{
"type": "object",
"properties": {
"resultCode": { "type": "integer" },
"resultDescription": { "type": "string" }
"resultCode": { "type": "integer", "example": 0 },
"resultDescription": { "type": "string", "example": "Debt closure notification sent successfully" }
}
}
@@ -2,14 +2,14 @@
"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" }
"requestId": { "type": "string", "example": "req-12345" },
"affiliateCode": { "type": "string", "example": "aff-67890" },
"debtId": { "type": "integer", "example": 123456 },
"productId": { "type": "string", "example": "prod-78901" },
"customerId": { "type": "string", "example": "cust-54321" },
"accountId": { "type": "string", "example": "acc-98765" },
"provideAmount": { "type": "number", "example": 1000.00 },
"collectAmount": { "type": "number", "example": 1150.00 },
"interestRate": { "type": "number", "example": 5.0 }
}
}
@@ -1,8 +1,8 @@
{
"type": "object",
"properties": {
"transactionId": { "type": "string" },
"resultCode": { "type": "integer" },
"resultDescription": { "type": "string" }
"transactionId": { "type": "string", "example": "txn-12345" },
"resultCode": { "type": "integer", "example": 0 },
"resultDescription": { "type": "string", "example": "Disbursement successful" }
}
}
+4 -4
View File
@@ -2,12 +2,12 @@
"type": "object",
"required": ["requestId", "phoneNums", "affiliateCode", "message"],
"properties": {
"requestId": { "type": "string" },
"requestId": { "type": "string", "example": "req-12345" },
"phoneNums": {
"type": "array",
"items": { "type": "string" }
"items": { "type": "string", "example": "+1234567890" }
},
"affiliateCode": { "type": "string" },
"message": { "type": "string" }
"affiliateCode": { "type": "string", "example": "aff-67890" },
"message": { "type": "string", "example": "Your verification code is 123456" }
}
}
+3 -3
View File
@@ -3,9 +3,9 @@
"properties": {
"undelivered": {
"type": "array",
"items": { "type": "string" }
"items": { "type": "string", "example": "+1234567890" }
},
"resultCode": { "type": "integer" },
"resultDescription": { "type": "string" }
"resultCode": { "type": "integer", "example": 0 },
"resultDescription": { "type": "string", "example": "SMS sent successfully" }
}
}