Enhance API Documentation for Notification Target Audience
- Added "target" field reference to the notification request and response structures in Swagger documentation, improving clarity for API consumers. - Introduced "notification.TargetAudienceType" definition with enumerated values for target audience options, enhancing the API's usability and understanding. - Updated related documentation files (YAML and JSON) to reflect these changes, ensuring consistency across all API documentation formats.
This commit is contained in:
@@ -7432,6 +7432,9 @@ const docTemplate = `{
|
|||||||
"schedule": {
|
"schedule": {
|
||||||
"$ref": "#/definitions/notification.ScheduleRequest"
|
"$ref": "#/definitions/notification.ScheduleRequest"
|
||||||
},
|
},
|
||||||
|
"target": {
|
||||||
|
"$ref": "#/definitions/notification.TargetAudienceType"
|
||||||
|
},
|
||||||
"tender": {
|
"tender": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -7467,6 +7470,9 @@ const docTemplate = `{
|
|||||||
"schedule": {
|
"schedule": {
|
||||||
"$ref": "#/definitions/notification.ScheduleResponse"
|
"$ref": "#/definitions/notification.ScheduleResponse"
|
||||||
},
|
},
|
||||||
|
"target": {
|
||||||
|
"$ref": "#/definitions/notification.TargetAudienceType"
|
||||||
|
},
|
||||||
"tender": {
|
"tender": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -7544,6 +7550,29 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"notification.TargetAudienceType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"all_users",
|
||||||
|
"specific_users",
|
||||||
|
"all_role",
|
||||||
|
"specific_role",
|
||||||
|
"all_companies",
|
||||||
|
"specific_company",
|
||||||
|
"all_customers",
|
||||||
|
"specific_customer"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"TargetAudienceAllUsers",
|
||||||
|
"TargetAudienceSpecificUsers",
|
||||||
|
"TargetAudienceAllRole",
|
||||||
|
"TargetAudienceSpecificRole",
|
||||||
|
"TargetAudienceAllCompanies",
|
||||||
|
"TargetAudienceSpecificCompany",
|
||||||
|
"TargetAudienceAllCustomers",
|
||||||
|
"TargetAudienceSpecificCustomer"
|
||||||
|
]
|
||||||
|
},
|
||||||
"response.APIError": {
|
"response.APIError": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -7426,6 +7426,9 @@
|
|||||||
"schedule": {
|
"schedule": {
|
||||||
"$ref": "#/definitions/notification.ScheduleRequest"
|
"$ref": "#/definitions/notification.ScheduleRequest"
|
||||||
},
|
},
|
||||||
|
"target": {
|
||||||
|
"$ref": "#/definitions/notification.TargetAudienceType"
|
||||||
|
},
|
||||||
"tender": {
|
"tender": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -7461,6 +7464,9 @@
|
|||||||
"schedule": {
|
"schedule": {
|
||||||
"$ref": "#/definitions/notification.ScheduleResponse"
|
"$ref": "#/definitions/notification.ScheduleResponse"
|
||||||
},
|
},
|
||||||
|
"target": {
|
||||||
|
"$ref": "#/definitions/notification.TargetAudienceType"
|
||||||
|
},
|
||||||
"tender": {
|
"tender": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -7538,6 +7544,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"notification.TargetAudienceType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"all_users",
|
||||||
|
"specific_users",
|
||||||
|
"all_role",
|
||||||
|
"specific_role",
|
||||||
|
"all_companies",
|
||||||
|
"specific_company",
|
||||||
|
"all_customers",
|
||||||
|
"specific_customer"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"TargetAudienceAllUsers",
|
||||||
|
"TargetAudienceSpecificUsers",
|
||||||
|
"TargetAudienceAllRole",
|
||||||
|
"TargetAudienceSpecificRole",
|
||||||
|
"TargetAudienceAllCompanies",
|
||||||
|
"TargetAudienceSpecificCompany",
|
||||||
|
"TargetAudienceAllCustomers",
|
||||||
|
"TargetAudienceSpecificCustomer"
|
||||||
|
]
|
||||||
|
},
|
||||||
"response.APIError": {
|
"response.APIError": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -666,6 +666,8 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
schedule:
|
schedule:
|
||||||
$ref: '#/definitions/notification.ScheduleRequest'
|
$ref: '#/definitions/notification.ScheduleRequest'
|
||||||
|
target:
|
||||||
|
$ref: '#/definitions/notification.TargetAudienceType'
|
||||||
tender:
|
tender:
|
||||||
type: string
|
type: string
|
||||||
title:
|
title:
|
||||||
@@ -689,6 +691,8 @@ definitions:
|
|||||||
$ref: '#/definitions/notification.NotificationPriority'
|
$ref: '#/definitions/notification.NotificationPriority'
|
||||||
schedule:
|
schedule:
|
||||||
$ref: '#/definitions/notification.ScheduleResponse'
|
$ref: '#/definitions/notification.ScheduleResponse'
|
||||||
|
target:
|
||||||
|
$ref: '#/definitions/notification.TargetAudienceType'
|
||||||
tender:
|
tender:
|
||||||
type: string
|
type: string
|
||||||
title:
|
title:
|
||||||
@@ -743,6 +747,26 @@ definitions:
|
|||||||
time:
|
time:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
|
notification.TargetAudienceType:
|
||||||
|
enum:
|
||||||
|
- all_users
|
||||||
|
- specific_users
|
||||||
|
- all_role
|
||||||
|
- specific_role
|
||||||
|
- all_companies
|
||||||
|
- specific_company
|
||||||
|
- all_customers
|
||||||
|
- specific_customer
|
||||||
|
type: string
|
||||||
|
x-enum-varnames:
|
||||||
|
- TargetAudienceAllUsers
|
||||||
|
- TargetAudienceSpecificUsers
|
||||||
|
- TargetAudienceAllRole
|
||||||
|
- TargetAudienceSpecificRole
|
||||||
|
- TargetAudienceAllCompanies
|
||||||
|
- TargetAudienceSpecificCompany
|
||||||
|
- TargetAudienceAllCustomers
|
||||||
|
- TargetAudienceSpecificCustomer
|
||||||
response.APIError:
|
response.APIError:
|
||||||
properties:
|
properties:
|
||||||
code:
|
code:
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ func (h *Handler) GetFlagSVG(c echo.Context) error {
|
|||||||
// AdminGetFlag returns a flag by country code (Admin)
|
// AdminGetFlag returns a flag by country code (Admin)
|
||||||
// @Summary Get flag by country code (Admin)
|
// @Summary Get flag by country code (Admin)
|
||||||
// @Description Retrieve a country flag by its 3-letter country code for admin panel
|
// @Description Retrieve a country flag by its 3-letter country code for admin panel
|
||||||
// @Tags Admin Flags
|
// @Tags Admin-Flags
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param country_code path string true "3-letter country code (e.g., POL, GRC)"
|
// @Param country_code path string true "3-letter country code (e.g., POL, GRC)"
|
||||||
|
|||||||
Reference in New Issue
Block a user