mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-14 01:02:32 +00:00
refactor(api): standardize DTOs and update swagger
Decouple API contract from internal models by introducing dedicated DTOs for requests and responses. - Add Response DTOs for all resources (API Keys, Bindings, Models, Namespaces, etc.) - Update Swagger annotations to use DTOs with field examples instead of internal models - Refactor handlers to bind and return DTO structures - Consolidate request/response definitions in the dto package
This commit is contained in:
@@ -22,7 +22,7 @@ func NewModelRegistryHandler(reg *service.ModelRegistryService) *ModelRegistryHa
|
||||
// @Tags admin
|
||||
// @Produce json
|
||||
// @Security AdminAuth
|
||||
// @Success 200 {object} ResponseEnvelope{data=service.ModelRegistryStatus}
|
||||
// @Success 200 {object} ResponseEnvelope{data=dto.ModelRegistryStatusResponse}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=MapData}
|
||||
// @Router /admin/model-registry/status [get]
|
||||
func (h *ModelRegistryHandler) GetStatus(c *gin.Context) {
|
||||
@@ -50,7 +50,7 @@ type refreshModelRegistryRequest struct {
|
||||
// @Produce json
|
||||
// @Security AdminAuth
|
||||
// @Param body body refreshModelRegistryRequest false "optional override ref"
|
||||
// @Success 200 {object} ResponseEnvelope{data=service.ModelRegistryCheckResult}
|
||||
// @Success 200 {object} ResponseEnvelope{data=dto.ModelRegistryCheckResponse}
|
||||
// @Failure 400 {object} ResponseEnvelope{data=MapData}
|
||||
// @Failure 500 {object} ResponseEnvelope{data=MapData}
|
||||
// @Router /admin/model-registry/check [post]
|
||||
|
||||
Reference in New Issue
Block a user