diff --git a/docs/docs.go b/docs/docs.go index 4901f76..769c22b 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -169,7 +169,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/merch.PricesResponse" + "$ref": "#/definitions/merch.ImageLink" } }, "400": { @@ -267,21 +267,11 @@ const docTemplate = `{ "name": "uuid", "in": "path", "required": true - }, - { - "type": "string", - "description": "image type", - "name": "type", - "in": "query", - "required": true } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/merch.PricesResponse" - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -778,6 +768,17 @@ const docTemplate = `{ } }, "definitions": { + "merch.ImageLink": { + "type": "object", + "properties": { + "etag": { + "type": "string" + }, + "link": { + "type": "string" + } + } + }, "merch.ListResponse": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index a1b5b73..d333c5a 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -161,7 +161,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/merch.PricesResponse" + "$ref": "#/definitions/merch.ImageLink" } }, "400": { @@ -259,21 +259,11 @@ "name": "uuid", "in": "path", "required": true - }, - { - "type": "string", - "description": "image type", - "name": "type", - "in": "query", - "required": true } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/merch.PricesResponse" - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -770,6 +760,17 @@ } }, "definitions": { + "merch.ImageLink": { + "type": "object", + "properties": { + "etag": { + "type": "string" + }, + "link": { + "type": "string" + } + } + }, "merch.ListResponse": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 2d9d9bc..c3f516b 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,12 @@ basePath: /api/v2 definitions: + merch.ImageLink: + properties: + etag: + type: string + link: + type: string + type: object merch.ListResponse: properties: merch_uuid: @@ -271,16 +278,9 @@ paths: name: uuid required: true type: string - - description: image type - in: query - name: type - required: true - type: string responses: "200": description: OK - schema: - $ref: '#/definitions/merch.PricesResponse' "400": description: Bad Request schema: @@ -311,7 +311,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/merch.PricesResponse' + $ref: '#/definitions/merch.ImageLink' "400": description: Bad Request schema: diff --git a/internal/api/merch/controller.go b/internal/api/merch/controller.go index d4e05f8..6d7cd5d 100644 --- a/internal/api/merch/controller.go +++ b/internal/api/merch/controller.go @@ -370,8 +370,7 @@ func (co *controller) getMerchImage(c *gin.Context) { // @Tags Merch images // @Security BearerAuth // @Param uuid path string true "merch_uuid" -// @Param type query string true "image type" -// @Success 200 {object} PricesResponse +// @Success 200 // @Failure 400 {object} responses.ErrorResponse400 // @Failure 500 {object} responses.ErrorResponse500 // @Router /merch/images/{uuid} [delete]