Update Configuration and Enhance Tender Approval Pagination
- Changed the server port from 8081 to 8082 for the web application. - Updated MongoDB URI to include authentication credentials for improved security. - Added new query parameters `limit` and `offset` for pagination in tender approval retrieval, enhancing the API's flexibility. - Modified the response structure to include metadata for pagination, improving the clarity of responses. - Updated API documentation to reflect the new pagination parameters and response format, ensuring consistency for API consumers.
This commit is contained in:
+33
-5
@@ -6006,6 +6006,23 @@ const docTemplate = `{
|
||||
],
|
||||
"summary": "Get tender approvals by company ID",
|
||||
"parameters": [
|
||||
{
|
||||
"maximum": 100,
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"description": "Number of approvals per page (1-100)",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"description": "Number of approvals to skip for pagination",
|
||||
"name": "offset",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"self-apply",
|
||||
@@ -6051,10 +6068,7 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/tender_approval.TenderApprovalWithTenderResponse"
|
||||
}
|
||||
"$ref": "#/definitions/tender_approval.TenderApprovalWithTenderListResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8171,6 +8185,20 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"tender_approval.TenderApprovalWithTenderListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"$ref": "#/definitions/response.Meta"
|
||||
},
|
||||
"tenders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/tender_approval.TenderApprovalWithTenderResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tender_approval.TenderApprovalWithTenderResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -8585,7 +8613,7 @@ const docTemplate = `{
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "2.0.0",
|
||||
Host: "localhost:8081",
|
||||
Host: "localhost:8082",
|
||||
BasePath: "/",
|
||||
Schemes: []string{},
|
||||
Title: "Tender Management API",
|
||||
|
||||
Reference in New Issue
Block a user