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}}",
|
"host": "{{.Host}}",
|
||||||
"basePath": "{{.BasePath}}",
|
"basePath": "{{.BasePath}}",
|
||||||
"paths": {
|
"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": {
|
"/merch/origins": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Get all origins",
|
"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": {
|
"merch.newOriginDTO": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
@ -173,6 +233,17 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"merch.originLink": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"origin_link": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"origin_name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.originsDTO": {
|
"merch.originsDTO": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,52 @@
|
||||||
},
|
},
|
||||||
"basePath": "/api/v2",
|
"basePath": "/api/v2",
|
||||||
"paths": {
|
"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": {
|
"/merch/origins": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Get all origins",
|
"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": {
|
"merch.newOriginDTO": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
@ -166,6 +226,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"merch.originLink": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"origin_link": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"origin_name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.originsDTO": {
|
"merch.originsDTO": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,15 @@ definitions:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
merch.newMerchDTO:
|
||||||
|
properties:
|
||||||
|
links:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/merch.originLink'
|
||||||
|
type: array
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
merch.newOriginDTO:
|
merch.newOriginDTO:
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
|
|
@ -17,6 +26,13 @@ definitions:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
merch.originLink:
|
||||||
|
properties:
|
||||||
|
origin_link:
|
||||||
|
type: string
|
||||||
|
origin_name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
merch.originsDTO:
|
merch.originsDTO:
|
||||||
properties:
|
properties:
|
||||||
origins:
|
origins:
|
||||||
|
|
@ -48,6 +64,36 @@ info:
|
||||||
title: Merch API
|
title: Merch API
|
||||||
version: "2.3"
|
version: "2.3"
|
||||||
paths:
|
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:
|
/merch/origins:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue