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}": {
@ -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": {
"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": {
"type": "object",
"properties": {