2026-03-01 22:15:10 +03:00
|
|
|
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
|
|
|
package docs
|
|
|
|
|
|
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
|
|
|
|
|
|
const docTemplate = `{
|
|
|
|
|
"schemes": {{ marshal .Schemes }},
|
|
|
|
|
"swagger": "2.0",
|
|
|
|
|
"info": {
|
|
|
|
|
"description": "{{escape .Description}}",
|
|
|
|
|
"title": "{{.Title}}",
|
|
|
|
|
"contact": {},
|
|
|
|
|
"version": "{{.Version}}"
|
|
|
|
|
},
|
|
|
|
|
"host": "{{.Host}}",
|
|
|
|
|
"basePath": "{{.BasePath}}",
|
|
|
|
|
"paths": {
|
2026-03-04 17:02:21 +03:00
|
|
|
"/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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-01 22:15:10 +03:00
|
|
|
"/merch/origins": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "Get all origins",
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"Origins"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Get all origins",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.originsDTO"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "Create new origin with name",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"Origins"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Create new origin",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"description": "origin body",
|
|
|
|
|
"name": "origin",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.newOriginDTO"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"delete": {
|
|
|
|
|
"description": "Marks origin as deleted by name.",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"Origins"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Delete origin",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"description": "origin body",
|
|
|
|
|
"name": "origin",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.deleteOriginDTO"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"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": {
|
|
|
|
|
"merch.deleteOriginDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-04 17:02:21 +03:00
|
|
|
"merch.newMerchDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"links": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/merch.originLink"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-01 22:15:10 +03:00
|
|
|
"merch.newOriginDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"merch.originItem": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-04 17:02:21 +03:00
|
|
|
"merch.originLink": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"origin_link": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"origin_name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-01 22:15:10 +03:00
|
|
|
"merch.originsDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"origins": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/merch.originItem"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"responses.BadRequest": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"error": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"example": "error"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"responses.InternalServerError": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"error": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"example": "error"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"responses.Unauthorized": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"error": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"example": "error"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}`
|
|
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
|
var SwaggerInfo = &swag.Spec{
|
|
|
|
|
Version: "2.3",
|
|
|
|
|
Host: "",
|
|
|
|
|
BasePath: "/api/v2",
|
|
|
|
|
Schemes: []string{},
|
|
|
|
|
Title: "Merch API",
|
|
|
|
|
Description: "Stores data about merch and prices",
|
|
|
|
|
InfoInstanceName: "swagger",
|
|
|
|
|
SwaggerTemplate: docTemplate,
|
|
|
|
|
LeftDelim: "{{",
|
|
|
|
|
RightDelim: "}}",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
|
|
}
|