diff --git a/docs/docs.go b/docs/docs.go index 2477d6c..9ec07c9 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -15,51 +15,6 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/merch": { - "post": { - "security": [ - { - "BearerAuth": [] - } - ], - "description": "Добавить новый мерч", - "consumes": [ - "application/json" - ], - "tags": [ - "Merch" - ], - "summary": "Добавить новый мерч", - "parameters": [ - { - "description": "новый мерч", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/merch.MerchDTO" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/responses.ErrorResponse400" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/responses.ErrorResponse500" - } - } - } - } - }, "/merch/": { "get": { "security": [ @@ -141,6 +96,49 @@ const docTemplate = `{ } } } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Добавить новый мерч", + "consumes": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Добавить новый мерч", + "parameters": [ + { + "description": "новый мерч", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/merch.MerchDTO" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/responses.ErrorResponse400" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/responses.ErrorResponse500" + } + } + } } }, "/merch/images/{uuid}": { @@ -1222,6 +1220,14 @@ const docTemplate = `{ } } }, + "merch.AmiamiDTO": { + "type": "object", + "properties": { + "link": { + "type": "string" + } + } + }, "merch.DeleteZeroPrices": { "type": "object", "properties": { @@ -1326,6 +1332,9 @@ const docTemplate = `{ "name": { "type": "string" }, + "origin_amiami": { + "$ref": "#/definitions/merch.AmiamiDTO" + }, "origin_mandarake": { "$ref": "#/definitions/merch.MandarakeDTO" }, @@ -1417,7 +1426,7 @@ const docTemplate = `{ "type": "string" }, "origins": { - "type": "string" + "type": "integer" } } }, diff --git a/docs/swagger.json b/docs/swagger.json index 50e1f7c..d132129 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -7,51 +7,6 @@ }, "basePath": "/api/v2", "paths": { - "/merch": { - "post": { - "security": [ - { - "BearerAuth": [] - } - ], - "description": "Добавить новый мерч", - "consumes": [ - "application/json" - ], - "tags": [ - "Merch" - ], - "summary": "Добавить новый мерч", - "parameters": [ - { - "description": "новый мерч", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/merch.MerchDTO" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/responses.ErrorResponse400" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/responses.ErrorResponse500" - } - } - } - } - }, "/merch/": { "get": { "security": [ @@ -133,6 +88,49 @@ } } } + }, + "post": { + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Добавить новый мерч", + "consumes": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Добавить новый мерч", + "parameters": [ + { + "description": "новый мерч", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/merch.MerchDTO" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/responses.ErrorResponse400" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/responses.ErrorResponse500" + } + } + } } }, "/merch/images/{uuid}": { @@ -1214,6 +1212,14 @@ } } }, + "merch.AmiamiDTO": { + "type": "object", + "properties": { + "link": { + "type": "string" + } + } + }, "merch.DeleteZeroPrices": { "type": "object", "properties": { @@ -1318,6 +1324,9 @@ "name": { "type": "string" }, + "origin_amiami": { + "$ref": "#/definitions/merch.AmiamiDTO" + }, "origin_mandarake": { "$ref": "#/definitions/merch.MandarakeDTO" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 6a7ae2c..ea2f927 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -7,6 +7,11 @@ definitions: thumbnail: type: string type: object + merch.AmiamiDTO: + properties: + link: + type: string + type: object merch.DeleteZeroPrices: properties: id: @@ -74,6 +79,8 @@ definitions: type: string name: type: string + origin_amiami: + $ref: '#/definitions/merch.AmiamiDTO' origin_mandarake: $ref: '#/definitions/merch.MandarakeDTO' origin_surugaya: @@ -202,7 +209,31 @@ info: title: Merch Parser version: 2.0.0-alpha paths: - /merch: + /merch/: + get: + description: Получить все записи мерча + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/merch.ListResponse' + type: array + "400": + description: Bad Request + schema: + $ref: '#/definitions/responses.ErrorResponse400' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/responses.ErrorResponse500' + security: + - BearerAuth: [] + summary: Получить все записи мерча + tags: + - Merch post: consumes: - application/json @@ -230,31 +261,6 @@ paths: summary: Добавить новый мерч tags: - Merch - /merch/: - get: - description: Получить все записи мерча - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/merch.ListResponse' - type: array - "400": - description: Bad Request - schema: - $ref: '#/definitions/responses.ErrorResponse400' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/responses.ErrorResponse500' - security: - - BearerAuth: [] - summary: Получить все записи мерча - tags: - - Merch put: consumes: - application/json