swagger docs update
This commit is contained in:
parent
bc3eee6434
commit
7ccf5eaa87
3 changed files with 279 additions and 0 deletions
105
docs/docs.go
105
docs/docs.go
|
|
@ -61,6 +61,50 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/merch/list": {
|
||||
"get": {
|
||||
"description": "Get all merch without origins",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Get all merch",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/merch.merchDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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/origins": {
|
||||
"get": {
|
||||
"description": "Get all origins",
|
||||
|
|
@ -189,6 +233,50 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/{uuid}": {
|
||||
"delete": {
|
||||
"description": "Marks merch and all its extra data as deleted by uuid.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Delete merch",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "merch uuid",
|
||||
"name": "uuid",
|
||||
"in": "path",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
|
|
@ -200,6 +288,23 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.merchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"merch_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.newMerchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,50 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/merch/list": {
|
||||
"get": {
|
||||
"description": "Get all merch without origins",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Get all merch",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/merch.merchDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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/origins": {
|
||||
"get": {
|
||||
"description": "Get all origins",
|
||||
|
|
@ -182,6 +226,50 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/{uuid}": {
|
||||
"delete": {
|
||||
"description": "Marks merch and all its extra data as deleted by uuid.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Delete merch",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "merch uuid",
|
||||
"name": "uuid",
|
||||
"in": "path",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
|
|
@ -193,6 +281,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.merchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"merch_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.newMerchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,17 @@ definitions:
|
|||
name:
|
||||
type: string
|
||||
type: object
|
||||
merch.merchDTO:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
merch_uuid:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
type: object
|
||||
merch.newMerchDTO:
|
||||
properties:
|
||||
links:
|
||||
|
|
@ -64,6 +75,35 @@ info:
|
|||
title: Merch API
|
||||
version: "2.3"
|
||||
paths:
|
||||
/merch/{uuid}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Marks merch and all its extra data as deleted by uuid.
|
||||
parameters:
|
||||
- description: merch uuid
|
||||
in: path
|
||||
name: uuid
|
||||
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'
|
||||
summary: Delete merch
|
||||
tags:
|
||||
- Merch
|
||||
/merch/create:
|
||||
post:
|
||||
consumes:
|
||||
|
|
@ -94,6 +134,35 @@ paths:
|
|||
summary: Create new merch
|
||||
tags:
|
||||
- Merch
|
||||
/merch/list:
|
||||
get:
|
||||
description: Get all merch without origins
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/merch.merchDTO'
|
||||
type: array
|
||||
"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'
|
||||
summary: Get all merch
|
||||
tags:
|
||||
- Merch
|
||||
/merch/origins:
|
||||
delete:
|
||||
consumes:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue