diff --git a/docs/docs.go b/docs/docs.go index 769c22b..8e556d2 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -192,7 +192,7 @@ const docTemplate = `{ "BearerAuth": [] } ], - "description": "Загрузить картинки по merch_uuid и query параметрам", + "description": "Загрузить картинку по merch_uuid. В ответ будут выданы ссылки на созданные картинки.", "consumes": [ "multipart/form-data" ], @@ -202,7 +202,7 @@ const docTemplate = `{ "tags": [ "Merch images" ], - "summary": "Загрузить картинки по merch_uuid и query параметрам", + "summary": "Загрузить картинку по merch_uuid", "parameters": [ { "type": "string", @@ -217,23 +217,14 @@ const docTemplate = `{ "name": "file", "in": "formData", "required": true - }, - { - "enum": [ - "thumbnail", - "full", - "all" - ], - "type": "string", - "description": "Image type: thumbnail, full or all", - "name": "imageType", - "in": "formData", - "required": true } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/imageStorage.UploadMerchImageResponse" + } }, "400": { "description": "Bad Request", @@ -255,11 +246,11 @@ const docTemplate = `{ "BearerAuth": [] } ], - "description": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам", + "description": "Удалить (безвозвратно) картинки по merch_uuid", "tags": [ "Merch images" ], - "summary": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам", + "summary": "Удалить (безвозвратно) картинки по merch_uuid", "parameters": [ { "type": "string", @@ -768,6 +759,17 @@ const docTemplate = `{ } }, "definitions": { + "imageStorage.UploadMerchImageResponse": { + "type": "object", + "properties": { + "fullImage": { + "type": "string" + }, + "thumbnail": { + "type": "string" + } + } + }, "merch.ImageLink": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index d333c5a..ea5dbf2 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -184,7 +184,7 @@ "BearerAuth": [] } ], - "description": "Загрузить картинки по merch_uuid и query параметрам", + "description": "Загрузить картинку по merch_uuid. В ответ будут выданы ссылки на созданные картинки.", "consumes": [ "multipart/form-data" ], @@ -194,7 +194,7 @@ "tags": [ "Merch images" ], - "summary": "Загрузить картинки по merch_uuid и query параметрам", + "summary": "Загрузить картинку по merch_uuid", "parameters": [ { "type": "string", @@ -209,23 +209,14 @@ "name": "file", "in": "formData", "required": true - }, - { - "enum": [ - "thumbnail", - "full", - "all" - ], - "type": "string", - "description": "Image type: thumbnail, full or all", - "name": "imageType", - "in": "formData", - "required": true } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/imageStorage.UploadMerchImageResponse" + } }, "400": { "description": "Bad Request", @@ -247,11 +238,11 @@ "BearerAuth": [] } ], - "description": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам", + "description": "Удалить (безвозвратно) картинки по merch_uuid", "tags": [ "Merch images" ], - "summary": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам", + "summary": "Удалить (безвозвратно) картинки по merch_uuid", "parameters": [ { "type": "string", @@ -760,6 +751,17 @@ } }, "definitions": { + "imageStorage.UploadMerchImageResponse": { + "type": "object", + "properties": { + "fullImage": { + "type": "string" + }, + "thumbnail": { + "type": "string" + } + } + }, "merch.ImageLink": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index c3f516b..1afef07 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,12 @@ basePath: /api/v2 definitions: + imageStorage.UploadMerchImageResponse: + properties: + fullImage: + type: string + thumbnail: + type: string + type: object merch.ImageLink: properties: etag: @@ -271,7 +278,7 @@ paths: - Merch /merch/images/{uuid}: delete: - description: Удалить (безвозвратно) картинки по merch_uuid и query параметрам + description: Удалить (безвозвратно) картинки по merch_uuid parameters: - description: merch_uuid in: path @@ -291,7 +298,7 @@ paths: $ref: '#/definitions/responses.ErrorResponse500' security: - BearerAuth: [] - summary: Удалить (безвозвратно) картинки по merch_uuid и query параметрам + summary: Удалить (безвозвратно) картинки по merch_uuid tags: - Merch images get: @@ -328,7 +335,8 @@ paths: post: consumes: - multipart/form-data - description: Загрузить картинки по merch_uuid и query параметрам + description: Загрузить картинку по merch_uuid. В ответ будут выданы ссылки на + созданные картинки. parameters: - description: Merch UUID in: path @@ -340,20 +348,13 @@ paths: name: file required: true type: file - - description: 'Image type: thumbnail, full or all' - enum: - - thumbnail - - full - - all - in: formData - name: imageType - required: true - type: string produces: - application/json responses: "200": description: OK + schema: + $ref: '#/definitions/imageStorage.UploadMerchImageResponse' "400": description: Bad Request schema: @@ -364,7 +365,7 @@ paths: $ref: '#/definitions/responses.ErrorResponse500' security: - BearerAuth: [] - summary: Загрузить картинки по merch_uuid и query параметрам + summary: Загрузить картинку по merch_uuid tags: - Merch images /prices: