swagger docs update
This commit is contained in:
parent
756b5c126f
commit
e503f67bc9
3 changed files with 452 additions and 24 deletions
181
docs/docs.go
181
docs/docs.go
|
|
@ -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}": {
|
"/merch/{uuid}": {
|
||||||
"put": {
|
"put": {
|
||||||
"description": "Update merch general info (except extra data)",
|
"description": "Update merch general info (except extra data)",
|
||||||
|
|
@ -396,11 +536,6 @@ const docTemplate = `{
|
||||||
},
|
},
|
||||||
"/prices": {
|
"/prices": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Получить цены мерча за период",
|
"description": "Получить цены мерча за период",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -450,11 +585,6 @@ const docTemplate = `{
|
||||||
},
|
},
|
||||||
"/prices/{uuid}": {
|
"/prices/{uuid}": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Получить перепады цен мерча за период по его merch_uuid",
|
"description": "Получить перепады цен мерча за период по его merch_uuid",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -511,6 +641,17 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"merch.DeleteZeroPrices": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"merch_uuid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.OriginWithPrices": {
|
"merch.OriginWithPrices": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"merch.deleteOriginDTO": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -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}": {
|
"/merch/{uuid}": {
|
||||||
"put": {
|
"put": {
|
||||||
"description": "Update merch general info (except extra data)",
|
"description": "Update merch general info (except extra data)",
|
||||||
|
|
@ -389,11 +529,6 @@
|
||||||
},
|
},
|
||||||
"/prices": {
|
"/prices": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Получить цены мерча за период",
|
"description": "Получить цены мерча за период",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -443,11 +578,6 @@
|
||||||
},
|
},
|
||||||
"/prices/{uuid}": {
|
"/prices/{uuid}": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Получить перепады цен мерча за период по его merch_uuid",
|
"description": "Получить перепады цен мерча за период по его merch_uuid",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -504,6 +634,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"merch.DeleteZeroPrices": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"merch_uuid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.OriginWithPrices": {
|
"merch.OriginWithPrices": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"merch.deleteOriginDTO": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
basePath: /api/v2
|
basePath: /api/v2
|
||||||
definitions:
|
definitions:
|
||||||
|
merch.DeleteZeroPrices:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
merch_uuid:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
merch.OriginWithPrices:
|
merch.OriginWithPrices:
|
||||||
properties:
|
properties:
|
||||||
origin:
|
origin:
|
||||||
|
|
@ -27,6 +34,19 @@ definitions:
|
||||||
$ref: '#/definitions/merch.OriginWithPrices'
|
$ref: '#/definitions/merch.OriginWithPrices'
|
||||||
type: array
|
type: array
|
||||||
type: object
|
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:
|
merch.deleteOriginDTO:
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
|
|
@ -368,6 +388,96 @@ paths:
|
||||||
summary: Create new origin
|
summary: Create new origin
|
||||||
tags:
|
tags:
|
||||||
- Origins
|
- 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:
|
/prices:
|
||||||
get:
|
get:
|
||||||
description: Получить цены мерча за период
|
description: Получить цены мерча за период
|
||||||
|
|
@ -397,8 +507,6 @@ paths:
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/responses.InternalServerError'
|
$ref: '#/definitions/responses.InternalServerError'
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Получить цены мерча за период
|
summary: Получить цены мерча за период
|
||||||
tags:
|
tags:
|
||||||
- Merch
|
- Merch
|
||||||
|
|
@ -436,8 +544,6 @@ paths:
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/responses.InternalServerError'
|
$ref: '#/definitions/responses.InternalServerError'
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Получить перепады цен мерча за период по его merch_uuid
|
summary: Получить перепады цен мерча за период по его merch_uuid
|
||||||
tags:
|
tags:
|
||||||
- Merch
|
- Merch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue