diff --git a/docs/docs.go b/docs/docs.go index 5275aab..7788abf 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -319,31 +319,23 @@ const docTemplate = `{ }, "/merch/labels/{uuid}": { "get": { - "security": [ - { - "BearerAuth": [] - } - ], - "description": "Получить метки товара по его uuid", + "description": "Получить персональные данные. Запрос данных по gRPC у сервиса авторизации.", "produces": [ "application/json" ], "tags": [ - "Merch labels" - ], - "summary": "Получить метки товара по его uuid", - "parameters": [ - { - "type": "string", - "description": "label uuid", - "name": "uuid", - "in": "path", - "required": true - } + "User" ], + "summary": "Получить персональные данные.", "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/common.PersonalDTO" + } + }, + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -889,9 +881,6 @@ const docTemplate = `{ }, "delete": { "description": "Marks merch and all its extra data as deleted by uuid.", - "consumes": [ - "application/json" - ], "tags": [ "Merch" ], @@ -1114,6 +1103,26 @@ const docTemplate = `{ } }, "definitions": { + "common.PersonalDTO": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "surname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "merch.DeleteZeroPrices": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 61908d7..16d273f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -312,31 +312,23 @@ }, "/merch/labels/{uuid}": { "get": { - "security": [ - { - "BearerAuth": [] - } - ], - "description": "Получить метки товара по его uuid", + "description": "Получить персональные данные. Запрос данных по gRPC у сервиса авторизации.", "produces": [ "application/json" ], "tags": [ - "Merch labels" - ], - "summary": "Получить метки товара по его uuid", - "parameters": [ - { - "type": "string", - "description": "label uuid", - "name": "uuid", - "in": "path", - "required": true - } + "User" ], + "summary": "Получить персональные данные.", "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/common.PersonalDTO" + } + }, + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -882,9 +874,6 @@ }, "delete": { "description": "Marks merch and all its extra data as deleted by uuid.", - "consumes": [ - "application/json" - ], "tags": [ "Merch" ], @@ -1107,6 +1096,26 @@ } }, "definitions": { + "common.PersonalDTO": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "surname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "merch.DeleteZeroPrices": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 1584523..2cc4ef4 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,18 @@ basePath: /api/v2 definitions: + common.PersonalDTO: + properties: + email: + type: string + name: + type: string + surname: + type: string + username: + type: string + uuid: + type: string + type: object merch.DeleteZeroPrices: properties: id: @@ -200,8 +213,6 @@ info: paths: /merch/{uuid}: delete: - consumes: - - application/json description: Marks merch and all its extra data as deleted by uuid. parameters: - description: merch uuid @@ -456,18 +467,16 @@ paths: tags: - Merch labels get: - description: Получить метки товара по его uuid - parameters: - - description: label uuid - in: path - name: uuid - required: true - type: string + description: Получить персональные данные. Запрос данных по gRPC у сервиса авторизации. produces: - application/json responses: "200": description: OK + schema: + $ref: '#/definitions/common.PersonalDTO' + "204": + description: No Content "400": description: Bad Request schema: @@ -480,11 +489,9 @@ paths: description: Internal Server Error schema: $ref: '#/definitions/responses.InternalServerError' - security: - - BearerAuth: [] - summary: Получить метки товара по его uuid + summary: Получить персональные данные. tags: - - Merch labels + - User put: consumes: - application/json diff --git a/internal/user/controller.go b/internal/user/controller.go index 2c909ab..a107a8c 100644 --- a/internal/user/controller.go +++ b/internal/user/controller.go @@ -130,7 +130,7 @@ func (co *controller) me(c *gin.Context) { // @Tags User // @Produce json // @Success 200 {object} common.PersonalDTO -// @Success 204 {object} +// @Success 204 // @Failure 400 {object} responses.BadRequest // @Failure 401 {object} responses.Unauthorized // @Failure 500 {object} responses.InternalServerError