swagger docs update

This commit is contained in:
nquidox 2025-12-15 18:15:28 +03:00
parent e9b58d171f
commit 895605e6b8
3 changed files with 141 additions and 117 deletions

View file

@ -15,51 +15,6 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"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"
}
}
}
}
},
"/merch/": {
"get": {
"security": [
@ -141,6 +96,49 @@ const docTemplate = `{
}
}
}
},
"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"
}
}
}
}
},
"/merch/images/{uuid}": {
@ -1222,6 +1220,14 @@ const docTemplate = `{
}
}
},
"merch.AmiamiDTO": {
"type": "object",
"properties": {
"link": {
"type": "string"
}
}
},
"merch.DeleteZeroPrices": {
"type": "object",
"properties": {
@ -1326,6 +1332,9 @@ const docTemplate = `{
"name": {
"type": "string"
},
"origin_amiami": {
"$ref": "#/definitions/merch.AmiamiDTO"
},
"origin_mandarake": {
"$ref": "#/definitions/merch.MandarakeDTO"
},
@ -1417,7 +1426,7 @@ const docTemplate = `{
"type": "string"
},
"origins": {
"type": "string"
"type": "integer"
}
}
},

View file

@ -7,51 +7,6 @@
},
"basePath": "/api/v2",
"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"
}
}
}
}
},
"/merch/": {
"get": {
"security": [
@ -133,6 +88,49 @@
}
}
}
},
"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"
}
}
}
}
},
"/merch/images/{uuid}": {
@ -1214,6 +1212,14 @@
}
}
},
"merch.AmiamiDTO": {
"type": "object",
"properties": {
"link": {
"type": "string"
}
}
},
"merch.DeleteZeroPrices": {
"type": "object",
"properties": {
@ -1318,6 +1324,9 @@
"name": {
"type": "string"
},
"origin_amiami": {
"$ref": "#/definitions/merch.AmiamiDTO"
},
"origin_mandarake": {
"$ref": "#/definitions/merch.MandarakeDTO"
},

View file

@ -7,6 +7,11 @@ definitions:
thumbnail:
type: string
type: object
merch.AmiamiDTO:
properties:
link:
type: string
type: object
merch.DeleteZeroPrices:
properties:
id:
@ -74,6 +79,8 @@ definitions:
type: string
name:
type: string
origin_amiami:
$ref: '#/definitions/merch.AmiamiDTO'
origin_mandarake:
$ref: '#/definitions/merch.MandarakeDTO'
origin_surugaya:
@ -202,7 +209,31 @@ info:
title: Merch Parser
version: 2.0.0-alpha
paths:
/merch:
/merch/:
get:
description: Получить все записи мерча
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/merch.ListResponse'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/responses.ErrorResponse400'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/responses.ErrorResponse500'
security:
- BearerAuth: []
summary: Получить все записи мерча
tags:
- Merch
post:
consumes:
- application/json
@ -230,31 +261,6 @@ paths:
summary: Добавить новый мерч
tags:
- Merch
/merch/:
get:
description: Получить все записи мерча
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/merch.ListResponse'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/responses.ErrorResponse400'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/responses.ErrorResponse500'
security:
- BearerAuth: []
summary: Получить все записи мерча
tags:
- Merch
put:
consumes:
- application/json