swagger docs update
This commit is contained in:
parent
e9b58d171f
commit
895605e6b8
3 changed files with 141 additions and 117 deletions
101
docs/docs.go
101
docs/docs.go
|
|
@ -15,51 +15,6 @@ const docTemplate = `{
|
||||||
"host": "{{.Host}}",
|
"host": "{{.Host}}",
|
||||||
"basePath": "{{.BasePath}}",
|
"basePath": "{{.BasePath}}",
|
||||||
"paths": {
|
"paths": {
|
||||||
"/merch": {
|
|
||||||
"post": {
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Добавить новый мерч",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"Merch"
|
|
||||||
],
|
|
||||||
"summary": "Добавить новый мерч",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "новый мерч",
|
|
||||||
"name": "body",
|
|
||||||
"in": "body",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/merch.MerchDTO"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK"
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Bad Request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/merch/": {
|
"/merch/": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
|
@ -141,6 +96,49 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Добавить новый мерч",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Merch"
|
||||||
|
],
|
||||||
|
"summary": "Добавить новый мерч",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "новый мерч",
|
||||||
|
"name": "body",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/merch.MerchDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/merch/images/{uuid}": {
|
"/merch/images/{uuid}": {
|
||||||
|
|
@ -1222,6 +1220,14 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"merch.AmiamiDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.DeleteZeroPrices": {
|
"merch.DeleteZeroPrices": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
@ -1326,6 +1332,9 @@ const docTemplate = `{
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"origin_amiami": {
|
||||||
|
"$ref": "#/definitions/merch.AmiamiDTO"
|
||||||
|
},
|
||||||
"origin_mandarake": {
|
"origin_mandarake": {
|
||||||
"$ref": "#/definitions/merch.MandarakeDTO"
|
"$ref": "#/definitions/merch.MandarakeDTO"
|
||||||
},
|
},
|
||||||
|
|
@ -1417,7 +1426,7 @@ const docTemplate = `{
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"origins": {
|
"origins": {
|
||||||
"type": "string"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,51 +7,6 @@
|
||||||
},
|
},
|
||||||
"basePath": "/api/v2",
|
"basePath": "/api/v2",
|
||||||
"paths": {
|
"paths": {
|
||||||
"/merch": {
|
|
||||||
"post": {
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"BearerAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Добавить новый мерч",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"Merch"
|
|
||||||
],
|
|
||||||
"summary": "Добавить новый мерч",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "новый мерч",
|
|
||||||
"name": "body",
|
|
||||||
"in": "body",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/merch.MerchDTO"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK"
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Bad Request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/merch/": {
|
"/merch/": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
|
@ -133,6 +88,49 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Добавить новый мерч",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Merch"
|
||||||
|
],
|
||||||
|
"summary": "Добавить новый мерч",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "новый мерч",
|
||||||
|
"name": "body",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/merch.MerchDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/merch/images/{uuid}": {
|
"/merch/images/{uuid}": {
|
||||||
|
|
@ -1214,6 +1212,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"merch.AmiamiDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.DeleteZeroPrices": {
|
"merch.DeleteZeroPrices": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
@ -1318,6 +1324,9 @@
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"origin_amiami": {
|
||||||
|
"$ref": "#/definitions/merch.AmiamiDTO"
|
||||||
|
},
|
||||||
"origin_mandarake": {
|
"origin_mandarake": {
|
||||||
"$ref": "#/definitions/merch.MandarakeDTO"
|
"$ref": "#/definitions/merch.MandarakeDTO"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@ definitions:
|
||||||
thumbnail:
|
thumbnail:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
merch.AmiamiDTO:
|
||||||
|
properties:
|
||||||
|
link:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
merch.DeleteZeroPrices:
|
merch.DeleteZeroPrices:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
|
@ -74,6 +79,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
origin_amiami:
|
||||||
|
$ref: '#/definitions/merch.AmiamiDTO'
|
||||||
origin_mandarake:
|
origin_mandarake:
|
||||||
$ref: '#/definitions/merch.MandarakeDTO'
|
$ref: '#/definitions/merch.MandarakeDTO'
|
||||||
origin_surugaya:
|
origin_surugaya:
|
||||||
|
|
@ -202,7 +209,31 @@ info:
|
||||||
title: Merch Parser
|
title: Merch Parser
|
||||||
version: 2.0.0-alpha
|
version: 2.0.0-alpha
|
||||||
paths:
|
paths:
|
||||||
/merch:
|
/merch/:
|
||||||
|
get:
|
||||||
|
description: Получить все записи мерча
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/merch.ListResponse'
|
||||||
|
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
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
@ -230,31 +261,6 @@ paths:
|
||||||
summary: Добавить новый мерч
|
summary: Добавить новый мерч
|
||||||
tags:
|
tags:
|
||||||
- Merch
|
- Merch
|
||||||
/merch/:
|
|
||||||
get:
|
|
||||||
description: Получить все записи мерча
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/merch.ListResponse'
|
|
||||||
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
|
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue