From 25d11b31daf1c500388d6b82ad0811d737800795 Mon Sep 17 00:00:00 2001 From: nquidox Date: Wed, 4 Mar 2026 17:02:21 +0300 Subject: [PATCH] swagger docs update --- docs/docs.go | 71 +++++++++++++++++++++++++++++++++++++++++++++++ docs/swagger.json | 71 +++++++++++++++++++++++++++++++++++++++++++++++ docs/swagger.yaml | 46 ++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+) diff --git a/docs/docs.go b/docs/docs.go index 6939e81..ca3c7e4 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -15,6 +15,52 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/merch/create": { + "post": { + "description": "Create new merch", + "consumes": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Create new merch", + "parameters": [ + { + "description": "merch body", + "name": "merch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/merch.newMerchDTO" + } + } + ], + "responses": { + "201": { + "description": "Created" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/responses.BadRequest" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/responses.Unauthorized" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/responses.InternalServerError" + } + } + } + } + }, "/merch/origins": { "get": { "description": "Get all origins", @@ -154,6 +200,20 @@ const docTemplate = `{ } } }, + "merch.newMerchDTO": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/merch.originLink" + } + }, + "name": { + "type": "string" + } + } + }, "merch.newOriginDTO": { "type": "object", "properties": { @@ -173,6 +233,17 @@ const docTemplate = `{ } } }, + "merch.originLink": { + "type": "object", + "properties": { + "origin_link": { + "type": "string" + }, + "origin_name": { + "type": "string" + } + } + }, "merch.originsDTO": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 8936b68..da9a4a8 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -8,6 +8,52 @@ }, "basePath": "/api/v2", "paths": { + "/merch/create": { + "post": { + "description": "Create new merch", + "consumes": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Create new merch", + "parameters": [ + { + "description": "merch body", + "name": "merch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/merch.newMerchDTO" + } + } + ], + "responses": { + "201": { + "description": "Created" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/responses.BadRequest" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/responses.Unauthorized" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/responses.InternalServerError" + } + } + } + } + }, "/merch/origins": { "get": { "description": "Get all origins", @@ -147,6 +193,20 @@ } } }, + "merch.newMerchDTO": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/merch.originLink" + } + }, + "name": { + "type": "string" + } + } + }, "merch.newOriginDTO": { "type": "object", "properties": { @@ -166,6 +226,17 @@ } } }, + "merch.originLink": { + "type": "object", + "properties": { + "origin_link": { + "type": "string" + }, + "origin_name": { + "type": "string" + } + } + }, "merch.originsDTO": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 052d193..f670148 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -5,6 +5,15 @@ definitions: name: type: string type: object + merch.newMerchDTO: + properties: + links: + items: + $ref: '#/definitions/merch.originLink' + type: array + name: + type: string + type: object merch.newOriginDTO: properties: name: @@ -17,6 +26,13 @@ definitions: name: type: string type: object + merch.originLink: + properties: + origin_link: + type: string + origin_name: + type: string + type: object merch.originsDTO: properties: origins: @@ -48,6 +64,36 @@ info: title: Merch API version: "2.3" paths: + /merch/create: + post: + consumes: + - application/json + description: Create new merch + parameters: + - description: merch body + in: body + name: merch + required: true + schema: + $ref: '#/definitions/merch.newMerchDTO' + responses: + "201": + description: Created + "400": + description: Bad Request + schema: + $ref: '#/definitions/responses.BadRequest' + "401": + description: Unauthorized + schema: + $ref: '#/definitions/responses.Unauthorized' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/responses.InternalServerError' + summary: Create new merch + tags: + - Merch /merch/origins: delete: consumes: