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:
n.nakhostin
2025-09-08 13:01:45 +03:30
parent 991771ee19
commit 8670b3272d
8 changed files with 297 additions and 151 deletions
+47 -41
View File
@@ -5619,6 +5619,17 @@
}
}
},
"company.CategoryResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"company.CompanyForm": {
"type": "object",
"properties": {
@@ -5795,7 +5806,7 @@
"type": "string"
},
"tags": {
"$ref": "#/definitions/company.CompanyTags"
"$ref": "#/definitions/company.CompanyTagsResponse"
},
"tax_id": {
"type": "string"
@@ -5814,46 +5825,6 @@
}
}
},
"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": {
@@ -5904,6 +5875,41 @@
}
}
},
"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": {