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:
+106
-113
@@ -33,7 +33,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "List companies with filters and pagination",
|
||||
"parameters": [
|
||||
@@ -245,7 +245,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Create a new company",
|
||||
"parameters": [
|
||||
@@ -320,7 +320,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by industry",
|
||||
"parameters": [
|
||||
@@ -404,7 +404,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Advanced search for companies",
|
||||
"parameters": [
|
||||
@@ -556,7 +556,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get company statistics",
|
||||
"responses": {
|
||||
@@ -602,7 +602,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by status",
|
||||
"parameters": [
|
||||
@@ -692,7 +692,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get companies by type",
|
||||
"parameters": [
|
||||
@@ -783,7 +783,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Get company by ID",
|
||||
"parameters": [
|
||||
@@ -848,7 +848,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company information",
|
||||
"parameters": [
|
||||
@@ -934,7 +934,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Delete company",
|
||||
"parameters": [
|
||||
@@ -989,7 +989,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Activate company",
|
||||
"parameters": [
|
||||
@@ -1044,7 +1044,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company status",
|
||||
"parameters": [
|
||||
@@ -1114,7 +1114,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Suspend company",
|
||||
"parameters": [
|
||||
@@ -1184,7 +1184,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company tags",
|
||||
"parameters": [
|
||||
@@ -1254,7 +1254,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Add tags to company",
|
||||
"parameters": [
|
||||
@@ -1324,7 +1324,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Remove tags from company",
|
||||
"parameters": [
|
||||
@@ -1394,7 +1394,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Update company verification status",
|
||||
"parameters": [
|
||||
@@ -1464,7 +1464,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Companies-Admin"
|
||||
"Admin-Companies"
|
||||
],
|
||||
"summary": "Verify company",
|
||||
"parameters": [
|
||||
@@ -1519,7 +1519,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "List customers with filters and pagination",
|
||||
"parameters": [
|
||||
@@ -1685,7 +1685,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Create a new customer",
|
||||
"parameters": [
|
||||
@@ -1760,7 +1760,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by company ID",
|
||||
"parameters": [
|
||||
@@ -1836,7 +1836,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by status",
|
||||
"parameters": [
|
||||
@@ -1926,7 +1926,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customers by type",
|
||||
"parameters": [
|
||||
@@ -2015,7 +2015,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "List customers with companies and filters",
|
||||
"parameters": [
|
||||
@@ -2183,7 +2183,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customer by ID",
|
||||
"parameters": [
|
||||
@@ -2248,7 +2248,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer information",
|
||||
"parameters": [
|
||||
@@ -2334,7 +2334,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Delete customer",
|
||||
"parameters": [
|
||||
@@ -2389,7 +2389,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Activate customer",
|
||||
"parameters": [
|
||||
@@ -2444,7 +2444,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Assign companies to a customer",
|
||||
"parameters": [
|
||||
@@ -2514,7 +2514,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Remove companies from a customer",
|
||||
"parameters": [
|
||||
@@ -2584,7 +2584,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer status",
|
||||
"parameters": [
|
||||
@@ -2654,7 +2654,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Suspend customer",
|
||||
"parameters": [
|
||||
@@ -2724,7 +2724,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Update customer verification status",
|
||||
"parameters": [
|
||||
@@ -2794,7 +2794,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Verify customer",
|
||||
"parameters": [
|
||||
@@ -2849,7 +2849,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Admin"
|
||||
"Admin-Customers"
|
||||
],
|
||||
"summary": "Get customer by ID with companies",
|
||||
"parameters": [
|
||||
@@ -2911,7 +2911,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Health"
|
||||
"Admin-Health"
|
||||
],
|
||||
"summary": "Health check endpoint",
|
||||
"responses": {
|
||||
@@ -2945,7 +2945,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get authenticated user profile",
|
||||
"responses": {
|
||||
@@ -3001,7 +3001,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update authenticated user profile",
|
||||
"parameters": [
|
||||
@@ -3082,7 +3082,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Change user password",
|
||||
"parameters": [
|
||||
@@ -3140,7 +3140,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Authenticate user login",
|
||||
"parameters": [
|
||||
@@ -3221,7 +3221,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Logout authenticated user",
|
||||
"responses": {
|
||||
@@ -3256,7 +3256,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Refresh access token",
|
||||
"parameters": [
|
||||
@@ -3326,7 +3326,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
"Admin-Authorization"
|
||||
],
|
||||
"summary": "Initiate password reset process",
|
||||
"parameters": [
|
||||
@@ -3395,7 +3395,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "List users",
|
||||
"parameters": [
|
||||
@@ -3507,7 +3507,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Create new user account",
|
||||
"parameters": [
|
||||
@@ -3594,7 +3594,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get users by company ID",
|
||||
"parameters": [
|
||||
@@ -3680,7 +3680,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get users by role",
|
||||
"parameters": [
|
||||
@@ -3766,7 +3766,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Get user by ID",
|
||||
"parameters": [
|
||||
@@ -3843,7 +3843,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user",
|
||||
"parameters": [
|
||||
@@ -3929,7 +3929,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Delete user",
|
||||
"parameters": [
|
||||
@@ -3996,7 +3996,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user role",
|
||||
"parameters": [
|
||||
@@ -4072,7 +4072,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
"Admin-Users"
|
||||
],
|
||||
"summary": "Update user status",
|
||||
"parameters": [
|
||||
@@ -4133,7 +4133,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/": {
|
||||
"/api/v1/profile": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -4148,7 +4148,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Get customer profile",
|
||||
"responses": {
|
||||
@@ -4191,46 +4191,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/logout": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Logout customer and invalidate access token",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
],
|
||||
"summary": "Customer logout",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Logout successful",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized - Invalid or missing token",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/profile/login": {
|
||||
"post": {
|
||||
"description": "Authenticate customer with username (email) and password. Returns access token, refresh token, and customer information upon successful authentication.",
|
||||
@@ -4241,7 +4201,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Customer login",
|
||||
"parameters": [
|
||||
@@ -4301,6 +4261,46 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/profile/logout": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Logout customer and invalidate access token",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Customer logout",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Logout successful",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized - Invalid or missing token",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.APIResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/profile/refresh-token": {
|
||||
"post": {
|
||||
"description": "Refresh access token using a valid refresh token. This allows customers to maintain their session without re-authentication.",
|
||||
@@ -4311,7 +4311,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Refresh customer access token",
|
||||
"parameters": [
|
||||
@@ -4371,7 +4371,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/with-companies": {
|
||||
"/api/v1/profile/with-companies": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@@ -4386,7 +4386,7 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Customers-Authorization"
|
||||
"Authorization"
|
||||
],
|
||||
"summary": "Get customer profile with companies",
|
||||
"responses": {
|
||||
@@ -5217,10 +5217,6 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"company_name": {
|
||||
"description": "Company customer fields",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_person": {
|
||||
"description": "Contact person (for company customers)",
|
||||
"allOf": [
|
||||
@@ -5268,6 +5264,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"registration_number": {
|
||||
"description": "Company customer fields",
|
||||
"type": "string"
|
||||
},
|
||||
"tax_id": {
|
||||
@@ -5922,31 +5919,27 @@
|
||||
"tags": [
|
||||
{
|
||||
"description": "System health check operations for monitoring application status and dependencies",
|
||||
"name": "Health"
|
||||
"name": "Admin-Health"
|
||||
},
|
||||
{
|
||||
"description": "User authentication and authorization operations including login, logout, token refresh, and password management for web panel administration",
|
||||
"name": "Authorization"
|
||||
"name": "Admin-Authorization"
|
||||
},
|
||||
{
|
||||
"description": "Administrative user management operations including CRUD operations, role management, status updates, and profile management for web panel administrators",
|
||||
"name": "Users"
|
||||
"name": "Admin-Users"
|
||||
},
|
||||
{
|
||||
"description": "Administrative customer management operations for web panel including CRUD operations, company assignment, verification, status management, and comprehensive filtering with pagination",
|
||||
"name": "Customers-Admin"
|
||||
},
|
||||
{
|
||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||
"name": "Customers-Authorization"
|
||||
"name": "Admin-Customers"
|
||||
},
|
||||
{
|
||||
"description": "Administrative company management operations for web panel including CRUD operations, tag management, verification, status updates, comprehensive search and filtering, and statistical reporting",
|
||||
"name": "Companies-Admin"
|
||||
"name": "Admin-Companies"
|
||||
},
|
||||
{
|
||||
"description": "Company-related operations for mobile application including company lookup, search, and basic information retrieval",
|
||||
"name": "Companies-Mobile"
|
||||
"description": "Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access",
|
||||
"name": "Authorization"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user