cms: clean up model file (#87179)

* move CreateAccessTokenResponseDTO to api.go

* remove unused types

* run make swagger-clean && make openapi3-gen
This commit is contained in:
Bruno
2024-05-13 00:22:19 -04:00
committed by GitHub
parent 0f3080ecb8
commit 6a3ab71d77
7 changed files with 7 additions and 99 deletions
+6 -2
View File
@@ -72,7 +72,7 @@ func (cma *CloudMigrationAPI) CreateToken(c *contextmodel.ReqContext) response.R
return response.Error(http.StatusInternalServerError, "creating gcom access token", err)
}
return response.JSON(http.StatusOK, cloudmigration.CreateAccessTokenResponseDTO(resp))
return response.JSON(http.StatusOK, CreateAccessTokenResponseDTO(resp))
}
// swagger:route GET /cloudmigration/migration migrations getMigrationList
@@ -325,5 +325,9 @@ type CloudMigrationRunListResponse struct {
// swagger:response cloudMigrationCreateTokenResponse
type CloudMigrationCreateTokenResponse struct {
// in: body
Body cloudmigration.CreateAccessTokenResponseDTO
Body CreateAccessTokenResponseDTO
}
type CreateAccessTokenResponseDTO struct {
Token string `json:"token"`
}