From 3090f15d3d297a5c3221000d6fc2f0e0b27f2505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahattin=20=C3=87ini=C3=A7?= Date: Mon, 20 May 2024 14:51:15 +0300 Subject: [PATCH] fix: Fixed runComponent swagger definition --- api/dashboard.go | 2 +- api/docs/docs.go | 7 +++++-- api/docs/swagger.json | 7 +++++-- api/docs/swagger.yaml | 6 ++++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/api/dashboard.go b/api/dashboard.go index 5fd8400..b20a121 100644 --- a/api/dashboard.go +++ b/api/dashboard.go @@ -288,7 +288,7 @@ func (a *API) deleteComponent(c echo.Context) error { // @Tags dashboard // @Accept json // @Produce json -// @Success 204 +// @Success 200 {object} queue.TaskResult // @Router /dashboards/{id}/components/{cpid}/run [post] func (a *API) runComponent(c echo.Context) error { component := c.Get(componentContextKey).(*models.Component) diff --git a/api/docs/docs.go b/api/docs/docs.go index 8d6da2d..954fc05 100644 --- a/api/docs/docs.go +++ b/api/docs/docs.go @@ -582,8 +582,11 @@ const docTemplate = `{ ], "summary": "Run Dashboard Component", "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/queue.TaskResult" + } } } } diff --git a/api/docs/swagger.json b/api/docs/swagger.json index a8ffb0e..3abdce1 100644 --- a/api/docs/swagger.json +++ b/api/docs/swagger.json @@ -571,8 +571,11 @@ ], "summary": "Run Dashboard Component", "responses": { - "204": { - "description": "No Content" + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/queue.TaskResult" + } } } } diff --git a/api/docs/swagger.yaml b/api/docs/swagger.yaml index 1622b15..ef32afa 100644 --- a/api/docs/swagger.yaml +++ b/api/docs/swagger.yaml @@ -751,8 +751,10 @@ paths: produces: - application/json responses: - "204": - description: No Content + "200": + description: OK + schema: + $ref: '#/definitions/queue.TaskResult' summary: Run Dashboard Component tags: - dashboard