Refactor health check and user management endpoints for improved structure and clarity
- Replaced the existing health check endpoint with a new handler at `/admin/v1/health` to align with the updated API structure. - Introduced a dedicated `health.go` file to encapsulate health check logic and response formatting. - Updated Swagger documentation to reflect the new health check endpoint and its response structure. - Refined user management routes to enhance clarity and maintainability, including changes to login, logout, and profile management endpoints. - Ensured all user-related endpoints are now prefixed appropriately and documented in Swagger for better API usability.
This commit is contained in:
+6
-28
@@ -1,22 +1,3 @@
|
||||
// Package main Tender Management API
|
||||
//
|
||||
// This is the API documentation for the Tender Management System.
|
||||
//
|
||||
// Schemes: http, https
|
||||
// Host: localhost:8081
|
||||
// BasePath: /api/v1
|
||||
// Version: 1.0.0
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
//
|
||||
// Security:
|
||||
// - bearer
|
||||
//
|
||||
// swagger:meta
|
||||
package main
|
||||
|
||||
// @title Tender Management API
|
||||
@@ -32,25 +13,22 @@ package main
|
||||
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
// @host localhost:8081
|
||||
// @BasePath /api/v1
|
||||
// @BasePath /admin/v1
|
||||
|
||||
// @securityDefinitions.apikey BearerAuth
|
||||
// @in header
|
||||
// @name Authorization
|
||||
// @description Type "Bearer" followed by a space and JWT token.
|
||||
|
||||
// @tag.name customers
|
||||
// @tag.description Customer management operations
|
||||
// @tag.name Users
|
||||
// @tag.description User management operations including authentication, profile management, and admin operations
|
||||
|
||||
// @tag.name users
|
||||
// @tag.description User management operations
|
||||
// @tag.name Authorization
|
||||
// @tag.description Authentication operations including login, logout, and token management
|
||||
|
||||
// @tag.name health
|
||||
// @tag.name Health
|
||||
// @tag.description Health check operations
|
||||
|
||||
// @tag.name auth
|
||||
// @tag.description Authentication operations
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
Reference in New Issue
Block a user