swagger docs update

This commit is contained in:
nquidox 2025-09-24 20:28:49 +03:00
parent ba78dd9772
commit 9dd51419bd
3 changed files with 229 additions and 8 deletions

View file

@ -224,6 +224,51 @@ const docTemplate = `{
}
}
},
"/prices": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить цены мерча за период",
"tags": [
"Merch"
],
"summary": "Получить цены мерча за период",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"name": "days",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.PricesResponse"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
}
},
"/user": {
"get": {
"security": [
@ -562,12 +607,51 @@ const docTemplate = `{
}
}
},
"merch.OriginWithPrices": {
"type": "object",
"properties": {
"origin": {
"type": "integer"
},
"prices": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.PriceEntry"
}
}
}
},
"merch.PriceEntry": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"value": {
"type": "integer"
}
}
},
"merch.PricesResponse": {
"type": "object",
"properties": {
"merch_uuid": {
"type": "string"
},
"name": {
"type": "string"
},
"origins": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.OriginWithPrices"
}
}
}
},
"merch.SurugayaDTO": {
"type": "object",
"properties": {
"cookie_values": {
"type": "string"
},
"link": {
"type": "string"
}

View file

@ -216,6 +216,51 @@
}
}
},
"/prices": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить цены мерча за период",
"tags": [
"Merch"
],
"summary": "Получить цены мерча за период",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"name": "days",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.PricesResponse"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
}
},
"/user": {
"get": {
"security": [
@ -554,12 +599,51 @@
}
}
},
"merch.OriginWithPrices": {
"type": "object",
"properties": {
"origin": {
"type": "integer"
},
"prices": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.PriceEntry"
}
}
}
},
"merch.PriceEntry": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"value": {
"type": "integer"
}
}
},
"merch.PricesResponse": {
"type": "object",
"properties": {
"merch_uuid": {
"type": "string"
},
"name": {
"type": "string"
},
"origins": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.OriginWithPrices"
}
}
}
},
"merch.SurugayaDTO": {
"type": "object",
"properties": {
"cookie_values": {
"type": "string"
},
"link": {
"type": "string"
}

View file

@ -23,10 +23,35 @@ definitions:
origin_surugaya:
$ref: '#/definitions/merch.SurugayaDTO'
type: object
merch.OriginWithPrices:
properties:
origin:
type: integer
prices:
items:
$ref: '#/definitions/merch.PriceEntry'
type: array
type: object
merch.PriceEntry:
properties:
created_at:
type: string
value:
type: integer
type: object
merch.PricesResponse:
properties:
merch_uuid:
type: string
name:
type: string
origins:
items:
$ref: '#/definitions/merch.OriginWithPrices'
type: array
type: object
merch.SurugayaDTO:
properties:
cookie_values:
type: string
link:
type: string
type: object
@ -228,6 +253,34 @@ paths:
summary: Обновить информацию про мерч
tags:
- Merch
/prices:
get:
description: Получить цены мерча за период
parameters:
- description: merch_uuid
in: query
name: days
type: string
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/merch.PricesResponse'
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
/user:
delete:
description: Помечает пользователя как удаленного по его uuid из токена