swagger docs update

This commit is contained in:
nquidox 2025-09-26 20:16:30 +03:00
parent 77c678dd7a
commit e3f893ac2d
3 changed files with 135 additions and 6 deletions

View file

@ -239,7 +239,7 @@ const docTemplate = `{
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
"description": "merch_uuid", "description": "period in days",
"name": "days", "name": "days",
"in": "query" "in": "query"
} }
@ -269,6 +269,55 @@ const docTemplate = `{
} }
} }
}, },
"/prices/{uuid}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить перепады цен мерча за период по его merch_uuid",
"tags": [
"Merch"
],
"summary": "Получить перепады цен мерча за период по его merch_uuid",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "period in days",
"name": "days",
"in": "query"
}
],
"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"
}
}
}
}
},
"/user": { "/user": {
"get": { "get": {
"security": [ "security": [
@ -625,7 +674,7 @@ const docTemplate = `{
"type": "object", "type": "object",
"properties": { "properties": {
"created_at": { "created_at": {
"type": "string" "type": "integer"
}, },
"value": { "value": {
"type": "integer" "type": "integer"

View file

@ -231,7 +231,7 @@
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
"description": "merch_uuid", "description": "period in days",
"name": "days", "name": "days",
"in": "query" "in": "query"
} }
@ -261,6 +261,55 @@
} }
} }
}, },
"/prices/{uuid}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить перепады цен мерча за период по его merch_uuid",
"tags": [
"Merch"
],
"summary": "Получить перепады цен мерча за период по его merch_uuid",
"parameters": [
{
"type": "string",
"description": "merch_uuid",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "period in days",
"name": "days",
"in": "query"
}
],
"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"
}
}
}
}
},
"/user": { "/user": {
"get": { "get": {
"security": [ "security": [
@ -617,7 +666,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"created_at": { "created_at": {
"type": "string" "type": "integer"
}, },
"value": { "value": {
"type": "integer" "type": "integer"

View file

@ -35,7 +35,7 @@ definitions:
merch.PriceEntry: merch.PriceEntry:
properties: properties:
created_at: created_at:
type: string type: integer
value: value:
type: integer type: integer
type: object type: object
@ -257,7 +257,7 @@ paths:
get: get:
description: Получить цены мерча за период description: Получить цены мерча за период
parameters: parameters:
- description: merch_uuid - description: period in days
in: query in: query
name: days name: days
type: string type: string
@ -281,6 +281,37 @@ paths:
summary: Получить цены мерча за период summary: Получить цены мерча за период
tags: tags:
- Merch - Merch
/prices/{uuid}:
get:
description: Получить перепады цен мерча за период по его merch_uuid
parameters:
- description: merch_uuid
in: path
name: uuid
required: true
type: string
- description: period in days
in: query
name: days
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
tags:
- Merch
/user: /user:
delete: delete:
description: Помечает пользователя как удаленного по его uuid из токена description: Помечает пользователя как удаленного по его uuid из токена