Enhance Company Management with Category Integration and API Documentation Updates
- Updated the Company service to include category validation during creation and updates, ensuring that only valid categories are associated with companies. - Introduced a new CategoryResponse structure to encapsulate category details in API responses, improving the clarity of the data returned. - Enhanced the CompanyResponse structure to include category details, providing more comprehensive information in API responses. - Updated Swagger and YAML documentation to reflect the new category integration, including detailed descriptions and examples for the updated response structures. - Improved error handling for invalid category data during company creation and updates, enhancing the robustness of the API. - Refactored existing API handlers to accommodate the new category-related changes, ensuring a seamless user experience across the application.
This commit is contained in:
+47
-41
@@ -5625,6 +5625,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.CategoryResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.CompanyForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5801,7 +5812,7 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"$ref": "#/definitions/company.CompanyTags"
|
||||
"$ref": "#/definitions/company.CompanyTagsResponse"
|
||||
},
|
||||
"tax_id": {
|
||||
"type": "string"
|
||||
@@ -5820,46 +5831,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.CompanyTags": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"categories": {
|
||||
"description": "Categories",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"certifications": {
|
||||
"description": "Certifications",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cpv_codes": {
|
||||
"description": "CPV codes (Common Procurement Vocabulary)",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"keywords": {
|
||||
"description": "Keywords for search and matching",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"specializations": {
|
||||
"description": "Specializations",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.CompanyTagsForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5910,6 +5881,41 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.CompanyTagsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"categories": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/company.CategoryResponse"
|
||||
}
|
||||
},
|
||||
"certifications": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cpv_codes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"specializations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"company.StatusForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user