swagger docs update
Some checks failed
/ Make image (push) Has been cancelled

This commit is contained in:
nquidox 2025-10-15 19:46:22 +03:00
parent dec89435a3
commit d23529e089
3 changed files with 559 additions and 95 deletions

View file

@ -95,6 +95,207 @@ const docTemplate = `{
} }
} }
} }
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Обновить информацию про мерч по его uuid в json-е",
"tags": [
"Merch"
],
"summary": "Обновить информацию про мерч",
"parameters": [
{
"description": "merch_uuid",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/merch.UpdateMerchDTO"
}
}
],
"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}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить картинки по merch_uuid и query параметрам",
"tags": [
"Merch images"
],
"summary": "Получить картинки по merch_uuid и query параметрам",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"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"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Загрузить картинки по merch_uuid и query параметрам",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"Merch images"
],
"summary": "Загрузить картинки по merch_uuid и query параметрам",
"parameters": [
{
"type": "string",
"description": "Merch UUID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "file",
"description": "Image file",
"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"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам",
"tags": [
"Merch images"
],
"summary": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"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"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
} }
}, },
"/merch/{uuid}": { "/merch/{uuid}": {
@ -139,49 +340,6 @@ const docTemplate = `{
} }
} }
}, },
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Обновить информацию про мерч по его uuid в json-е",
"tags": [
"Merch"
],
"summary": "Обновить информацию про мерч",
"parameters": [
{
"description": "merch_uuid",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/merch.MerchDTO"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/merch.MerchDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
},
"delete": { "delete": {
"security": [ "security": [
{ {
@ -706,6 +864,23 @@ const docTemplate = `{
} }
} }
}, },
"merch.UpdateMerchDTO": {
"type": "object",
"properties": {
"link": {
"type": "string"
},
"merch_uuid": {
"type": "string"
},
"name": {
"type": "string"
},
"origin": {
"type": "string"
}
}
},
"responses.ErrorResponse400": { "responses.ErrorResponse400": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -87,6 +87,207 @@
} }
} }
} }
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Обновить информацию про мерч по его uuid в json-е",
"tags": [
"Merch"
],
"summary": "Обновить информацию про мерч",
"parameters": [
{
"description": "merch_uuid",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/merch.UpdateMerchDTO"
}
}
],
"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}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить картинки по merch_uuid и query параметрам",
"tags": [
"Merch images"
],
"summary": "Получить картинки по merch_uuid и query параметрам",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"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"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Загрузить картинки по merch_uuid и query параметрам",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"Merch images"
],
"summary": "Загрузить картинки по merch_uuid и query параметрам",
"parameters": [
{
"type": "string",
"description": "Merch UUID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "file",
"description": "Image file",
"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"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам",
"tags": [
"Merch images"
],
"summary": "Удалить (безвозвратно) картинки по merch_uuid и query параметрам",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"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"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
} }
}, },
"/merch/{uuid}": { "/merch/{uuid}": {
@ -131,49 +332,6 @@
} }
} }
}, },
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Обновить информацию про мерч по его uuid в json-е",
"tags": [
"Merch"
],
"summary": "Обновить информацию про мерч",
"parameters": [
{
"description": "merch_uuid",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/merch.MerchDTO"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/merch.MerchDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
},
"delete": { "delete": {
"security": [ "security": [
{ {
@ -698,6 +856,23 @@
} }
} }
}, },
"merch.UpdateMerchDTO": {
"type": "object",
"properties": {
"link": {
"type": "string"
},
"merch_uuid": {
"type": "string"
},
"name": {
"type": "string"
},
"origin": {
"type": "string"
}
}
},
"responses.ErrorResponse400": { "responses.ErrorResponse400": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -55,6 +55,17 @@ definitions:
link: link:
type: string type: string
type: object type: object
merch.UpdateMerchDTO:
properties:
link:
type: string
merch_uuid:
type: string
name:
type: string
origin:
type: string
type: object
responses.ErrorResponse400: responses.ErrorResponse400:
properties: properties:
error: error:
@ -173,6 +184,31 @@ paths:
summary: Получить все записи мерча summary: Получить все записи мерча
tags: tags:
- Merch - Merch
put:
description: Обновить информацию про мерч по его uuid в json-е
parameters:
- description: merch_uuid
in: body
name: body
required: true
schema:
$ref: '#/definitions/merch.UpdateMerchDTO'
responses:
"200":
description: OK
"400":
description: Bad Request
schema:
$ref: '#/definitions/responses.ErrorResponse400'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/responses.ErrorResponse500'
security:
- BearerAuth: []
summary: Обновить информацию про мерч
tags:
- Merch
/merch/{uuid}: /merch/{uuid}:
delete: delete:
description: Пометить мерч как удаленный по его uuid description: Пометить мерч как удаленный по его uuid
@ -226,20 +262,25 @@ paths:
summary: Получить всю информацию про мерч summary: Получить всю информацию про мерч
tags: tags:
- Merch - Merch
put: /merch/images/{uuid}:
description: Обновить информацию про мерч по его uuid в json-е delete:
description: Удалить (безвозвратно) картинки по merch_uuid и query параметрам
parameters: parameters:
- description: merch_uuid - description: merch_uuid
in: body in: path
name: body name: uuid
required: true required: true
schema: type: string
$ref: '#/definitions/merch.MerchDTO' - description: image type
in: query
name: type
required: true
type: string
responses: responses:
"200": "200":
description: OK description: OK
schema: schema:
$ref: '#/definitions/merch.MerchDTO' $ref: '#/definitions/merch.PricesResponse'
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
@ -250,9 +291,82 @@ paths:
$ref: '#/definitions/responses.ErrorResponse500' $ref: '#/definitions/responses.ErrorResponse500'
security: security:
- BearerAuth: [] - BearerAuth: []
summary: Обновить информацию про мерч summary: Удалить (безвозвратно) картинки по merch_uuid и query параметрам
tags: tags:
- Merch - Merch images
get:
description: Получить картинки по merch_uuid и query параметрам
parameters:
- description: merch_uuid
in: path
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:
$ref: '#/definitions/responses.ErrorResponse400'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/responses.ErrorResponse500'
security:
- BearerAuth: []
summary: Получить картинки по merch_uuid и query параметрам
tags:
- Merch images
post:
consumes:
- multipart/form-data
description: Загрузить картинки по merch_uuid и query параметрам
parameters:
- description: Merch UUID
in: path
name: uuid
required: true
type: string
- description: Image file
in: formData
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
"400":
description: Bad Request
schema:
$ref: '#/definitions/responses.ErrorResponse400'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/responses.ErrorResponse500'
security:
- BearerAuth: []
summary: Загрузить картинки по merch_uuid и query параметрам
tags:
- Merch images
/prices: /prices:
get: get:
description: Получить цены мерча за период description: Получить цены мерча за период