Enhance Tender API with New Recommendation Endpoint and Route Updates
- Updated the tender API to include a new endpoint for recommending public tenders based on company profiles, enhancing user experience for mobile application users. - Modified existing routes to reflect the new structure, changing the tender details route and adding a dedicated recommendation route. - Improved Swagger documentation to accurately represent the new endpoint, including detailed descriptions, parameters, and response formats. - Ensured adherence to Clean Architecture principles by maintaining clear separation of concerns in the service and handler layers.
This commit is contained in:
@@ -5368,7 +5368,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/tenders/{id}": {
|
||||
"/api/v1/tenders/read/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -5426,6 +5426,88 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/tenders/recommend": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Retrieve active tenders for mobile application users with automatic company-based matching from customer profile",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Tenders"
|
||||
],
|
||||
"summary": "Get public tenders",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Number of items per page (default: 20, max: 50)",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Number of items to skip (default: 0)",
|
||||
"name": "offset",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by country code",
|
||||
"name": "country_code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Minimum estimated value",
|
||||
"name": "min_estimated_value",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Maximum estimated value",
|
||||
"name": "max_estimated_value",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
|
||||
Reference in New Issue
Block a user