swagger docs update
This commit is contained in:
parent
03e114db0b
commit
a6e6917bac
3 changed files with 213 additions and 0 deletions
81
docs/docs.go
81
docs/docs.go
|
|
@ -15,6 +15,51 @@ 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/user": {
|
"/user": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
|
@ -317,6 +362,42 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"merch.MandarakeDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"merch.MerchDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"merch_uuid": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"origin_mandarake": {
|
||||||
|
"$ref": "#/definitions/merch.MandarakeDTO"
|
||||||
|
},
|
||||||
|
"origin_surugaya": {
|
||||||
|
"$ref": "#/definitions/merch.SurugayaDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"merch.SurugayaDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"cookie_values": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"responses.ErrorResponse400": {
|
"responses.ErrorResponse400": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,51 @@
|
||||||
},
|
},
|
||||||
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/user": {
|
"/user": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
|
@ -309,6 +354,42 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"merch.MandarakeDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"merch.MerchDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"merch_uuid": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"origin_mandarake": {
|
||||||
|
"$ref": "#/definitions/merch.MandarakeDTO"
|
||||||
|
},
|
||||||
|
"origin_surugaya": {
|
||||||
|
"$ref": "#/definitions/merch.SurugayaDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"merch.SurugayaDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"cookie_values": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"responses.ErrorResponse400": {
|
"responses.ErrorResponse400": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,28 @@
|
||||||
basePath: /api/v2
|
basePath: /api/v2
|
||||||
definitions:
|
definitions:
|
||||||
|
merch.MandarakeDTO:
|
||||||
|
properties:
|
||||||
|
link:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
merch.MerchDTO:
|
||||||
|
properties:
|
||||||
|
merch_uuid:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
origin_mandarake:
|
||||||
|
$ref: '#/definitions/merch.MandarakeDTO'
|
||||||
|
origin_surugaya:
|
||||||
|
$ref: '#/definitions/merch.SurugayaDTO'
|
||||||
|
type: object
|
||||||
|
merch.SurugayaDTO:
|
||||||
|
properties:
|
||||||
|
cookie_values:
|
||||||
|
type: string
|
||||||
|
link:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
responses.ErrorResponse400:
|
responses.ErrorResponse400:
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
|
|
@ -67,6 +90,34 @@ info:
|
||||||
title: Merch Parser
|
title: Merch Parser
|
||||||
version: 2.0.0-alpha
|
version: 2.0.0-alpha
|
||||||
paths:
|
paths:
|
||||||
|
/merch:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Добавить новый мерч
|
||||||
|
parameters:
|
||||||
|
- description: новый мерч
|
||||||
|
in: body
|
||||||
|
name: 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'
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
summary: Добавить новый мерч
|
||||||
|
tags:
|
||||||
|
- Merch
|
||||||
/user:
|
/user:
|
||||||
delete:
|
delete:
|
||||||
description: Помечает пользователя как удаленного по его uuid из токена
|
description: Помечает пользователя как удаленного по его uuid из токена
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue