swagger docs update

This commit is contained in:
nquidox 2026-03-04 17:59:55 +03:00
parent bc3eee6434
commit 7ccf5eaa87
3 changed files with 279 additions and 0 deletions

View file

@ -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": { "/merch/origins": {
"get": { "get": {
"description": "Get all origins", "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": { "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": { "merch.newMerchDTO": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -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": { "/merch/origins": {
"get": { "get": {
"description": "Get all origins", "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": { "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": { "merch.newMerchDTO": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -5,6 +5,17 @@ definitions:
name: name:
type: string type: string
type: object type: object
merch.merchDTO:
properties:
created_at:
type: string
merch_uuid:
type: string
name:
type: string
updated_at:
type: string
type: object
merch.newMerchDTO: merch.newMerchDTO:
properties: properties:
links: links:
@ -64,6 +75,35 @@ info:
title: Merch API title: Merch API
version: "2.3" version: "2.3"
paths: 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: /merch/create:
post: post:
consumes: consumes:
@ -94,6 +134,35 @@ paths:
summary: Create new merch summary: Create new merch
tags: tags:
- Merch - 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: /merch/origins:
delete: delete:
consumes: consumes: