swagger docs update

This commit is contained in:
nquidox 2026-03-10 23:44:59 +03:00
parent 9e97f082fa
commit e17f68a7e5
3 changed files with 414 additions and 0 deletions

View file

@ -1,5 +1,32 @@
basePath: /api/v2
definitions:
merch.OriginWithPrices:
properties:
origin:
type: string
prices:
items:
$ref: '#/definitions/merch.PriceEntry'
type: array
type: object
merch.PriceEntry:
properties:
created_at:
type: integer
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.deleteOriginDTO:
properties:
name:
@ -341,4 +368,77 @@ paths:
summary: Create new origin
tags:
- Origins
/prices:
get:
description: Получить цены мерча за период
parameters:
- description: period in days
in: query
name: days
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/merch.PricesResponse'
type: array
"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
/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
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/merch.PricesResponse'
"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: Получить перепады цен мерча за период по его merch_uuid
tags:
- Merch
swagger: "2.0"