From 2e4718059a816ad20ad3dce9e1775f084f032245 Mon Sep 17 00:00:00 2001 From: edoriggio Date: Thu, 22 Aug 2024 13:50:59 +0200 Subject: [PATCH] fixed swag issue when generating getDSL doc --- app/docs/docs.go | 2 +- app/docs/swagger.json | 2 +- app/docs/swagger.yaml | 2 +- app/internal/controller/dsl.go | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/docs/docs.go b/app/docs/docs.go index 7623a103..8b0e8352 100644 --- a/app/docs/docs.go +++ b/app/docs/docs.go @@ -43,7 +43,7 @@ const docTemplate = `{ "type": "integer", "default": 10, "description": "size of the page", - "name": "pageSize", + "name": "size", "in": "query" }, { diff --git a/app/docs/swagger.json b/app/docs/swagger.json index 9b74ebf2..2ecc28db 100644 --- a/app/docs/swagger.json +++ b/app/docs/swagger.json @@ -36,7 +36,7 @@ "type": "integer", "default": 10, "description": "size of the page", - "name": "pageSize", + "name": "size", "in": "query" }, { diff --git a/app/docs/swagger.yaml b/app/docs/swagger.yaml index 8de5423d..e3c5c4e2 100644 --- a/app/docs/swagger.yaml +++ b/app/docs/swagger.yaml @@ -140,7 +140,7 @@ paths: in: query maximum: 100 minimum: 1 - name: pageSize + name: size type: integer - default: 100 description: knn's k diff --git a/app/internal/controller/dsl.go b/app/internal/controller/dsl.go index e5b36558..a5b07c44 100644 --- a/app/internal/controller/dsl.go +++ b/app/internal/controller/dsl.go @@ -12,10 +12,10 @@ import ( // @Description Retrieve the filtering DSL specifications // @Tags DSL // @Produce json -// @Param page parameter string false "parameter name" -// @Success 200 {object} models.TypesMap -// @Failure 400 {object} models.HTTPError -// @Failure 500 {object} models.HTTPError +// @Param page query string false "parameter name" +// @Success 200 {object} []string +// @Failure 400 {object} models.HTTPError +// @Failure 500 {object} models.HTTPError // @Router /search [post] func GetDSL(ctx *gin.Context) { var parameter = ctx.Query("parameter")