swagger docs update

This commit is contained in:
nquidox 2026-03-11 20:17:40 +03:00
parent 756b5c126f
commit e503f67bc9
3 changed files with 452 additions and 24 deletions

View file

@ -293,6 +293,146 @@ const docTemplate = `{
}
}
},
"/merch/zeroprices": {
"get": {
"description": "Получить нулевые цены",
"produces": [
"application/json"
],
"tags": [
"Merch zero prices"
],
"summary": "Получить нулевые цены",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.ZeroPrice"
}
}
},
"204": {
"description": "No Content"
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/responses.Unauthorized"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.InternalServerError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Пометить нулевые цены как удаленные",
"consumes": [
"application/json"
],
"tags": [
"Merch zero prices"
],
"summary": "Пометить нулевые цены как удаленные",
"parameters": [
{
"description": "payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/merch.DeleteZeroPrices"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"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/zeroprices/period": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Пометить нулевые цены как удаленные за указанный период",
"tags": [
"Merch zero prices"
],
"summary": "Пометить нулевые цены как удаленные за указанный период",
"parameters": [
{
"type": "string",
"description": "start",
"name": "start",
"in": "query",
"required": true
},
{
"type": "string",
"description": "end",
"name": "end",
"in": "query",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"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/{uuid}": {
"put": {
"description": "Update merch general info (except extra data)",
@ -396,11 +536,6 @@ const docTemplate = `{
},
"/prices": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить цены мерча за период",
"produces": [
"application/json"
@ -450,11 +585,6 @@ const docTemplate = `{
},
"/prices/{uuid}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить перепады цен мерча за период по его merch_uuid",
"produces": [
"application/json"
@ -511,6 +641,17 @@ const docTemplate = `{
}
},
"definitions": {
"merch.DeleteZeroPrices": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"merch_uuid": {
"type": "string"
}
}
},
"merch.OriginWithPrices": {
"type": "object",
"properties": {
@ -553,6 +694,26 @@ const docTemplate = `{
}
}
},
"merch.ZeroPrice": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"merch_uuid": {
"type": "string"
},
"name": {
"type": "string"
},
"origin": {
"type": "string"
}
}
},
"merch.deleteOriginDTO": {
"type": "object",
"properties": {

View file

@ -286,6 +286,146 @@
}
}
},
"/merch/zeroprices": {
"get": {
"description": "Получить нулевые цены",
"produces": [
"application/json"
],
"tags": [
"Merch zero prices"
],
"summary": "Получить нулевые цены",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/merch.ZeroPrice"
}
}
},
"204": {
"description": "No Content"
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/responses.Unauthorized"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.InternalServerError"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Пометить нулевые цены как удаленные",
"consumes": [
"application/json"
],
"tags": [
"Merch zero prices"
],
"summary": "Пометить нулевые цены как удаленные",
"parameters": [
{
"description": "payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/merch.DeleteZeroPrices"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"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/zeroprices/period": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Пометить нулевые цены как удаленные за указанный период",
"tags": [
"Merch zero prices"
],
"summary": "Пометить нулевые цены как удаленные за указанный период",
"parameters": [
{
"type": "string",
"description": "start",
"name": "start",
"in": "query",
"required": true
},
{
"type": "string",
"description": "end",
"name": "end",
"in": "query",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"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/{uuid}": {
"put": {
"description": "Update merch general info (except extra data)",
@ -389,11 +529,6 @@
},
"/prices": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить цены мерча за период",
"produces": [
"application/json"
@ -443,11 +578,6 @@
},
"/prices/{uuid}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Получить перепады цен мерча за период по его merch_uuid",
"produces": [
"application/json"
@ -504,6 +634,17 @@
}
},
"definitions": {
"merch.DeleteZeroPrices": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"merch_uuid": {
"type": "string"
}
}
},
"merch.OriginWithPrices": {
"type": "object",
"properties": {
@ -546,6 +687,26 @@
}
}
},
"merch.ZeroPrice": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"merch_uuid": {
"type": "string"
},
"name": {
"type": "string"
},
"origin": {
"type": "string"
}
}
},
"merch.deleteOriginDTO": {
"type": "object",
"properties": {

View file

@ -1,5 +1,12 @@
basePath: /api/v2
definitions:
merch.DeleteZeroPrices:
properties:
id:
type: integer
merch_uuid:
type: string
type: object
merch.OriginWithPrices:
properties:
origin:
@ -27,6 +34,19 @@ definitions:
$ref: '#/definitions/merch.OriginWithPrices'
type: array
type: object
merch.ZeroPrice:
properties:
created_at:
type: string
id:
type: integer
merch_uuid:
type: string
name:
type: string
origin:
type: string
type: object
merch.deleteOriginDTO:
properties:
name:
@ -368,6 +388,96 @@ paths:
summary: Create new origin
tags:
- Origins
/merch/zeroprices:
delete:
consumes:
- application/json
description: Пометить нулевые цены как удаленные
parameters:
- description: payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/merch.DeleteZeroPrices'
responses:
"204":
description: No Content
"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'
security:
- BearerAuth: []
summary: Пометить нулевые цены как удаленные
tags:
- Merch zero prices
get:
description: Получить нулевые цены
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/merch.ZeroPrice'
type: array
"204":
description: No Content
"401":
description: Unauthorized
schema:
$ref: '#/definitions/responses.Unauthorized'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/responses.InternalServerError'
summary: Получить нулевые цены
tags:
- Merch zero prices
/merch/zeroprices/period:
delete:
description: Пометить нулевые цены как удаленные за указанный период
parameters:
- description: start
in: query
name: start
required: true
type: string
- description: end
in: query
name: end
required: true
type: string
responses:
"204":
description: No Content
"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'
security:
- BearerAuth: []
summary: Пометить нулевые цены как удаленные за указанный период
tags:
- Merch zero prices
/prices:
get:
description: Получить цены мерча за период
@ -397,8 +507,6 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/responses.InternalServerError'
security:
- BearerAuth: []
summary: Получить цены мерча за период
tags:
- Merch
@ -436,8 +544,6 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/responses.InternalServerError'
security:
- BearerAuth: []
summary: Получить перепады цен мерча за период по его merch_uuid
tags:
- Merch