Update API Documentation and Enhance Tender Query Parameters
- Changed references in API documentation from `main.HealthResponse` to `bootstrap.HealthResponse` for consistency. - Added new query parameters `publication_from` and `publication_to` to the tender listing and recommendation endpoints to allow filtering by publication date. - Updated the `ListTendersRequest` struct to include optional fields for `from` and `to` timestamps. - Modified the `TenderRepository` and `TenderService` interfaces to support the new filtering parameters in the tender listing functionality. - Enhanced the service and handler layers to process the new query parameters, improving the flexibility of tender retrieval.
This commit is contained in:
+56
-32
@@ -3428,13 +3428,13 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "System is healthy and operational",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/main.HealthResponse"
|
||||
"$ref": "#/definitions/bootstrap.HealthResponse"
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "System is unhealthy or experiencing issues",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/main.HealthResponse"
|
||||
"$ref": "#/definitions/bootstrap.HealthResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6368,6 +6368,18 @@ const docTemplate = `{
|
||||
"description": "Maximum estimated value",
|
||||
"name": "max_estimated_value",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication from",
|
||||
"name": "publication_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication to",
|
||||
"name": "publication_to",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -6509,6 +6521,18 @@ const docTemplate = `{
|
||||
"description": "Maximum estimated value",
|
||||
"name": "max_estimated_value",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication from",
|
||||
"name": "publication_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication to",
|
||||
"name": "publication_to",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -6548,6 +6572,36 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"bootstrap.HealthResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"description": "Service name",
|
||||
"type": "string",
|
||||
"example": "tender-management-api"
|
||||
},
|
||||
"status": {
|
||||
"description": "Current health status",
|
||||
"type": "string",
|
||||
"example": "healthy"
|
||||
},
|
||||
"time": {
|
||||
"description": "Current Unix timestamp",
|
||||
"type": "integer",
|
||||
"example": 1699123456
|
||||
},
|
||||
"uptime": {
|
||||
"description": "Service uptime duration",
|
||||
"type": "string",
|
||||
"example": "24h30m15s"
|
||||
},
|
||||
"version": {
|
||||
"description": "API version",
|
||||
"type": "string",
|
||||
"example": "2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.AddTagsForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7790,36 +7844,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"main.HealthResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"description": "Service name",
|
||||
"type": "string",
|
||||
"example": "tender-management-api"
|
||||
},
|
||||
"status": {
|
||||
"description": "Current health status",
|
||||
"type": "string",
|
||||
"example": "healthy"
|
||||
},
|
||||
"time": {
|
||||
"description": "Current Unix timestamp",
|
||||
"type": "integer",
|
||||
"example": 1699123456
|
||||
},
|
||||
"uptime": {
|
||||
"description": "Service uptime duration",
|
||||
"type": "string",
|
||||
"example": "24h30m15s"
|
||||
},
|
||||
"version": {
|
||||
"description": "API version",
|
||||
"type": "string",
|
||||
"example": "2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response.APIError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+56
-32
@@ -3422,13 +3422,13 @@
|
||||
"200": {
|
||||
"description": "System is healthy and operational",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/main.HealthResponse"
|
||||
"$ref": "#/definitions/bootstrap.HealthResponse"
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "System is unhealthy or experiencing issues",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/main.HealthResponse"
|
||||
"$ref": "#/definitions/bootstrap.HealthResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6362,6 +6362,18 @@
|
||||
"description": "Maximum estimated value",
|
||||
"name": "max_estimated_value",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication from",
|
||||
"name": "publication_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication to",
|
||||
"name": "publication_to",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -6503,6 +6515,18 @@
|
||||
"description": "Maximum estimated value",
|
||||
"name": "max_estimated_value",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication from",
|
||||
"name": "publication_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Publication to",
|
||||
"name": "publication_to",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -6542,6 +6566,36 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"bootstrap.HealthResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"description": "Service name",
|
||||
"type": "string",
|
||||
"example": "tender-management-api"
|
||||
},
|
||||
"status": {
|
||||
"description": "Current health status",
|
||||
"type": "string",
|
||||
"example": "healthy"
|
||||
},
|
||||
"time": {
|
||||
"description": "Current Unix timestamp",
|
||||
"type": "integer",
|
||||
"example": 1699123456
|
||||
},
|
||||
"uptime": {
|
||||
"description": "Service uptime duration",
|
||||
"type": "string",
|
||||
"example": "24h30m15s"
|
||||
},
|
||||
"version": {
|
||||
"description": "API version",
|
||||
"type": "string",
|
||||
"example": "2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.AddTagsForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7784,36 +7838,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"main.HealthResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"description": "Service name",
|
||||
"type": "string",
|
||||
"example": "tender-management-api"
|
||||
},
|
||||
"status": {
|
||||
"description": "Current health status",
|
||||
"type": "string",
|
||||
"example": "healthy"
|
||||
},
|
||||
"time": {
|
||||
"description": "Current Unix timestamp",
|
||||
"type": "integer",
|
||||
"example": 1699123456
|
||||
},
|
||||
"uptime": {
|
||||
"description": "Service uptime duration",
|
||||
"type": "string",
|
||||
"example": "24h30m15s"
|
||||
},
|
||||
"version": {
|
||||
"description": "API version",
|
||||
"type": "string",
|
||||
"example": "2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response.APIError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+41
-25
@@ -1,5 +1,28 @@
|
||||
basePath: /
|
||||
definitions:
|
||||
bootstrap.HealthResponse:
|
||||
properties:
|
||||
service:
|
||||
description: Service name
|
||||
example: tender-management-api
|
||||
type: string
|
||||
status:
|
||||
description: Current health status
|
||||
example: healthy
|
||||
type: string
|
||||
time:
|
||||
description: Current Unix timestamp
|
||||
example: 1699123456
|
||||
type: integer
|
||||
uptime:
|
||||
description: Service uptime duration
|
||||
example: 24h30m15s
|
||||
type: string
|
||||
version:
|
||||
description: API version
|
||||
example: 2.0.0
|
||||
type: string
|
||||
type: object
|
||||
company.AddTagsForm:
|
||||
properties:
|
||||
categories:
|
||||
@@ -810,29 +833,6 @@ definitions:
|
||||
- feedback_type
|
||||
- tender_id
|
||||
type: object
|
||||
main.HealthResponse:
|
||||
properties:
|
||||
service:
|
||||
description: Service name
|
||||
example: tender-management-api
|
||||
type: string
|
||||
status:
|
||||
description: Current health status
|
||||
example: healthy
|
||||
type: string
|
||||
time:
|
||||
description: Current Unix timestamp
|
||||
example: 1699123456
|
||||
type: integer
|
||||
uptime:
|
||||
description: Service uptime duration
|
||||
example: 24h30m15s
|
||||
type: string
|
||||
version:
|
||||
description: API version
|
||||
example: 2.0.0
|
||||
type: string
|
||||
type: object
|
||||
response.APIError:
|
||||
properties:
|
||||
code:
|
||||
@@ -3469,11 +3469,11 @@ paths:
|
||||
"200":
|
||||
description: System is healthy and operational
|
||||
schema:
|
||||
$ref: '#/definitions/main.HealthResponse'
|
||||
$ref: '#/definitions/bootstrap.HealthResponse'
|
||||
"503":
|
||||
description: System is unhealthy or experiencing issues
|
||||
schema:
|
||||
$ref: '#/definitions/main.HealthResponse'
|
||||
$ref: '#/definitions/bootstrap.HealthResponse'
|
||||
summary: Health check endpoint
|
||||
tags:
|
||||
- Admin-Health
|
||||
@@ -5284,6 +5284,14 @@ paths:
|
||||
in: query
|
||||
name: max_estimated_value
|
||||
type: number
|
||||
- description: Publication from
|
||||
in: query
|
||||
name: publication_from
|
||||
type: number
|
||||
- description: Publication to
|
||||
in: query
|
||||
name: publication_to
|
||||
type: number
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -5371,6 +5379,14 @@ paths:
|
||||
in: query
|
||||
name: max_estimated_value
|
||||
type: number
|
||||
- description: Publication from
|
||||
in: query
|
||||
name: publication_from
|
||||
type: number
|
||||
- description: Publication to
|
||||
in: query
|
||||
name: publication_to
|
||||
type: number
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user