Refactor API documentation and update endpoint tags for clarity
- Updated README.md to reflect changes in endpoint categories, renaming "Customers-Admin" to "Admin-Customers" and "Companies-Admin" to "Admin-Companies" for consistency. - Modified health check endpoint tags from "Health" to "Admin-Health" to align with the new naming convention. - Adjusted Swagger documentation to replace outdated tags and ensure accurate representation of the API structure. - Enhanced user and customer handler documentation to reflect the new "Admin-Authorization" and "Admin-Users" tags, improving clarity in the API documentation.
This commit is contained in:
+18
-18
@@ -28,7 +28,7 @@ func NewHandler(service Service, userHandler *user.Handler, logger logger.Logger
|
||||
// CreateCompany creates a new company (Web Panel)
|
||||
// @Summary Create a new company
|
||||
// @Description Create a new company with comprehensive information including business details, address, tags, and customer assignment. This endpoint is used by the web panel for full company registration.
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param company body CreateCompanyForm true "Company information including type, business details, address, tags, and optional customer assignment"
|
||||
@@ -67,7 +67,7 @@ func (h *Handler) CreateCompany(c echo.Context) error {
|
||||
// GetCompany retrieves a company by ID (Web Panel)
|
||||
// @Summary Get company by ID
|
||||
// @Description Retrieve detailed company information by company ID
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -94,7 +94,7 @@ func (h *Handler) GetCompany(c echo.Context) error {
|
||||
// UpdateCompany updates a company (Web Panel)
|
||||
// @Summary Update company information
|
||||
// @Description Update company information including business details, address, tags, and customer assignment
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -139,7 +139,7 @@ func (h *Handler) UpdateCompany(c echo.Context) error {
|
||||
// DeleteCompany deletes a company (Web Panel)
|
||||
// @Summary Delete company
|
||||
// @Description Soft delete a company by setting status to inactive
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -174,7 +174,7 @@ func (h *Handler) DeleteCompany(c echo.Context) error {
|
||||
// ListCompanies lists companies with filters and pagination (Web Panel)
|
||||
// @Summary List companies with filters and pagination
|
||||
// @Description Retrieve a paginated list of companies with advanced filtering options including search, type, status, industry, verification status, tags, and business criteria. Supports sorting and pagination.
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param search query string false "Search term to filter companies by name, description, or industry"
|
||||
@@ -220,7 +220,7 @@ func (h *Handler) ListCompanies(c echo.Context) error {
|
||||
// SearchCompanies searches companies with advanced filters (Web Panel)
|
||||
// @Summary Advanced search for companies
|
||||
// @Description Search companies with advanced filtering capabilities including tags, business criteria, and location
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param q query string false "Search query"
|
||||
@@ -261,7 +261,7 @@ func (h *Handler) SearchCompanies(c echo.Context) error {
|
||||
// UpdateCompanyStatus updates company status (Web Panel)
|
||||
// @Summary Update company status
|
||||
// @Description Update company account status (active, inactive, suspended, pending)
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -302,7 +302,7 @@ func (h *Handler) UpdateCompanyStatus(c echo.Context) error {
|
||||
// UpdateCompanyVerification updates company verification status (Web Panel)
|
||||
// @Summary Update company verification status
|
||||
// @Description Update company verification and compliance status
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -343,7 +343,7 @@ func (h *Handler) UpdateCompanyVerification(c echo.Context) error {
|
||||
// UpdateCompanyTags updates company tags (Web Panel)
|
||||
// @Summary Update company tags
|
||||
// @Description Update company tags (CPV, categories, keywords, specializations, certifications)
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -384,7 +384,7 @@ func (h *Handler) UpdateCompanyTags(c echo.Context) error {
|
||||
// AddTags adds tags to a company (Web Panel)
|
||||
// @Summary Add tags to company
|
||||
// @Description Add specific tags to a company
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -425,7 +425,7 @@ func (h *Handler) AddTags(c echo.Context) error {
|
||||
// RemoveTags removes tags from a company (Web Panel)
|
||||
// @Summary Remove tags from company
|
||||
// @Description Remove specific tags from a company
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -466,7 +466,7 @@ func (h *Handler) RemoveTags(c echo.Context) error {
|
||||
// VerifyCompany verifies a company (Web Panel)
|
||||
// @Summary Verify company
|
||||
// @Description Mark a company as verified
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -501,7 +501,7 @@ func (h *Handler) VerifyCompany(c echo.Context) error {
|
||||
// SuspendCompany suspends a company (Web Panel)
|
||||
// @Summary Suspend company
|
||||
// @Description Suspend a company account with reason
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -542,7 +542,7 @@ func (h *Handler) SuspendCompany(c echo.Context) error {
|
||||
// ActivateCompany activates a company (Web Panel)
|
||||
// @Summary Activate company
|
||||
// @Description Activate a suspended company account
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Company ID"
|
||||
@@ -577,7 +577,7 @@ func (h *Handler) ActivateCompany(c echo.Context) error {
|
||||
// GetCompanyStats returns company statistics (Web Panel)
|
||||
// @Summary Get company statistics
|
||||
// @Description Get comprehensive company statistics for dashboard
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} response.APIResponse{data=CompanyStatsResponse} "Company statistics retrieved successfully"
|
||||
@@ -596,7 +596,7 @@ func (h *Handler) GetCompanyStats(c echo.Context) error {
|
||||
// GetCompaniesByType retrieves companies by type (Web Panel)
|
||||
// @Summary Get companies by type
|
||||
// @Description Retrieve companies filtered by their type (private, public, government, ngo, startup)
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param type path string true "Company type" Enums(private, public, government, ngo, startup)
|
||||
@@ -654,7 +654,7 @@ func (h *Handler) GetCompaniesByType(c echo.Context) error {
|
||||
// GetCompaniesByStatus retrieves companies by status (Web Panel)
|
||||
// @Summary Get companies by status
|
||||
// @Description Retrieve companies filtered by their status (active, inactive, suspended, pending)
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param status path string true "Company status" Enums(active, inactive, suspended, pending)
|
||||
@@ -711,7 +711,7 @@ func (h *Handler) GetCompaniesByStatus(c echo.Context) error {
|
||||
// GetCompaniesByIndustry retrieves companies by industry (Web Panel)
|
||||
// @Summary Get companies by industry
|
||||
// @Description Retrieve companies filtered by their industry
|
||||
// @Tags Companies-Admin
|
||||
// @Tags Admin-Companies
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param industry path string true "Industry"
|
||||
|
||||
Reference in New Issue
Block a user