swagger docs update
This commit is contained in:
parent
97f8d27430
commit
25d11b31da
3 changed files with 188 additions and 0 deletions
71
docs/docs.go
71
docs/docs.go
|
|
@ -15,6 +15,52 @@ const docTemplate = `{
|
|||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/merch/create": {
|
||||
"post": {
|
||||
"description": "Create new merch",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Create new merch",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "merch body",
|
||||
"name": "merch",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.newMerchDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created"
|
||||
},
|
||||
"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/origins": {
|
||||
"get": {
|
||||
"description": "Get all origins",
|
||||
|
|
@ -154,6 +200,20 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.newMerchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"links": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/merch.originLink"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.newOriginDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -173,6 +233,17 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.originLink": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"origin_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.originsDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,52 @@
|
|||
},
|
||||
"basePath": "/api/v2",
|
||||
"paths": {
|
||||
"/merch/create": {
|
||||
"post": {
|
||||
"description": "Create new merch",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Create new merch",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "merch body",
|
||||
"name": "merch",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.newMerchDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created"
|
||||
},
|
||||
"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/origins": {
|
||||
"get": {
|
||||
"description": "Get all origins",
|
||||
|
|
@ -147,6 +193,20 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.newMerchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"links": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/merch.originLink"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.newOriginDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -166,6 +226,17 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.originLink": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"origin_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.originsDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,15 @@ definitions:
|
|||
name:
|
||||
type: string
|
||||
type: object
|
||||
merch.newMerchDTO:
|
||||
properties:
|
||||
links:
|
||||
items:
|
||||
$ref: '#/definitions/merch.originLink'
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
merch.newOriginDTO:
|
||||
properties:
|
||||
name:
|
||||
|
|
@ -17,6 +26,13 @@ definitions:
|
|||
name:
|
||||
type: string
|
||||
type: object
|
||||
merch.originLink:
|
||||
properties:
|
||||
origin_link:
|
||||
type: string
|
||||
origin_name:
|
||||
type: string
|
||||
type: object
|
||||
merch.originsDTO:
|
||||
properties:
|
||||
origins:
|
||||
|
|
@ -48,6 +64,36 @@ info:
|
|||
title: Merch API
|
||||
version: "2.3"
|
||||
paths:
|
||||
/merch/create:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Create new merch
|
||||
parameters:
|
||||
- description: merch body
|
||||
in: body
|
||||
name: merch
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/merch.newMerchDTO'
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
"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'
|
||||
summary: Create new merch
|
||||
tags:
|
||||
- Merch
|
||||
/merch/origins:
|
||||
delete:
|
||||
consumes:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue