diff --git a/app/swagger/eco_digifi_swagger.json b/app/swagger/eco_digifi_swagger.json index 1d7a4e0..289d760 100644 --- a/app/swagger/eco_digifi_swagger.json +++ b/app/swagger/eco_digifi_swagger.json @@ -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": { diff --git a/app/swagger/schemas/eco/AuthenticationRequest.json b/app/swagger/schemas/eco/AuthenticationRequest.json index 20a0ee6..cf135d7 100644 --- a/app/swagger/schemas/eco/AuthenticationRequest.json +++ b/app/swagger/schemas/eco/AuthenticationRequest.json @@ -3,10 +3,12 @@ "required": ["username", "password"], "properties": { "username": { - "type": "string" + "type": "string", + "example": "user" }, "password": { - "type": "string" + "type": "string", + "example": "password" } } } diff --git a/app/swagger/schemas/eco/AuthenticationResponse.json b/app/swagger/schemas/eco/AuthenticationResponse.json index 6441ec0..025fc57 100644 --- a/app/swagger/schemas/eco/AuthenticationResponse.json +++ b/app/swagger/schemas/eco/AuthenticationResponse.json @@ -5,10 +5,12 @@ "type": "string" }, "resultDescription": { - "type": "string" + "type": "string", + "example": "Authentication successful" }, "token": { - "type": "string" + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } } diff --git a/app/swagger/schemas/eco/CollectLoanRequest.json b/app/swagger/schemas/eco/CollectLoanRequest.json index b56a42c..fbe7824 100644 --- a/app/swagger/schemas/eco/CollectLoanRequest.json +++ b/app/swagger/schemas/eco/CollectLoanRequest.json @@ -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 } } } diff --git a/app/swagger/schemas/eco/CollectLoanResponse.json b/app/swagger/schemas/eco/CollectLoanResponse.json index 6a1d458..42a6426 100644 --- a/app/swagger/schemas/eco/CollectLoanResponse.json +++ b/app/swagger/schemas/eco/CollectLoanResponse.json @@ -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" } } } diff --git a/app/swagger/schemas/eco/DebtClosureNotificationRequest.json b/app/swagger/schemas/eco/DebtClosureNotificationRequest.json index 3df3242..de770ee 100644 --- a/app/swagger/schemas/eco/DebtClosureNotificationRequest.json +++ b/app/swagger/schemas/eco/DebtClosureNotificationRequest.json @@ -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 } } } diff --git a/app/swagger/schemas/eco/DebtClosureNotificationResponse.json b/app/swagger/schemas/eco/DebtClosureNotificationResponse.json index 9aa7844..1b6045d 100644 --- a/app/swagger/schemas/eco/DebtClosureNotificationResponse.json +++ b/app/swagger/schemas/eco/DebtClosureNotificationResponse.json @@ -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" } } } diff --git a/app/swagger/schemas/eco/DisbursementRequest.json b/app/swagger/schemas/eco/DisbursementRequest.json index 9ce9ef4..af97039 100644 --- a/app/swagger/schemas/eco/DisbursementRequest.json +++ b/app/swagger/schemas/eco/DisbursementRequest.json @@ -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 } } } diff --git a/app/swagger/schemas/eco/DisbursementResponse.json b/app/swagger/schemas/eco/DisbursementResponse.json index fb32424..83aa8c4 100644 --- a/app/swagger/schemas/eco/DisbursementResponse.json +++ b/app/swagger/schemas/eco/DisbursementResponse.json @@ -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" } } } diff --git a/app/swagger/schemas/eco/SendSMSRequest.json b/app/swagger/schemas/eco/SendSMSRequest.json index 1d55501..7d9d525 100644 --- a/app/swagger/schemas/eco/SendSMSRequest.json +++ b/app/swagger/schemas/eco/SendSMSRequest.json @@ -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" } } } diff --git a/app/swagger/schemas/eco/SendSMSResponse.json b/app/swagger/schemas/eco/SendSMSResponse.json index a373eb6..e8ae375 100644 --- a/app/swagger/schemas/eco/SendSMSResponse.json +++ b/app/swagger/schemas/eco/SendSMSResponse.json @@ -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" } } }