2026-03-01 22:15:10 +03:00
|
|
|
{
|
|
|
|
|
"swagger": "2.0",
|
|
|
|
|
"info": {
|
|
|
|
|
"description": "Stores data about merch and prices",
|
|
|
|
|
"title": "Merch API",
|
|
|
|
|
"contact": {},
|
|
|
|
|
"version": "2.3"
|
|
|
|
|
},
|
|
|
|
|
"basePath": "/api/v2",
|
|
|
|
|
"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-07 15:50:05 +03:00
|
|
|
"/merch/extra/{uuid}": {
|
|
|
|
|
"put": {
|
|
|
|
|
"description": "Update ONLY merch extra data",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"Merch"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Update merch extra data",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "merch uuid",
|
|
|
|
|
"name": "uuid",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"description": "payload",
|
|
|
|
|
"name": "payload",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.extraDataDTO"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.extraDataDTO"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"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-04 17:59:55 +03:00
|
|
|
"/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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-04 17:59:55 +03:00
|
|
|
},
|
|
|
|
|
"/merch/{uuid}": {
|
2026-03-07 15:50:05 +03:00
|
|
|
"put": {
|
|
|
|
|
"description": "Update merch general info (except extra data)",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"Merch"
|
|
|
|
|
],
|
|
|
|
|
"summary": "Update merch",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "merch uuid",
|
|
|
|
|
"name": "uuid",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"description": "payload",
|
|
|
|
|
"name": "payload",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.updateMerchDTO"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/merch.merchDTO"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"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-04 17:59:55 +03:00
|
|
|
"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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-01 22:15:10 +03:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"definitions": {
|
|
|
|
|
"merch.deleteOriginDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-07 15:50:05 +03:00
|
|
|
"merch.extraDataDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"links": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/merch.originLink"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"merch_uuid": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-04 17:59:55 +03:00
|
|
|
"merch.merchDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"created_at": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"merch_uuid": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"updated_at": {
|
|
|
|
|
"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": {
|
2026-03-07 15:50:05 +03:00
|
|
|
"origin": {
|
2026-03-04 17:02:21 +03:00
|
|
|
"type": "string"
|
|
|
|
|
},
|
2026-03-07 15:50:05 +03:00
|
|
|
"origin_link": {
|
2026-03-04 17:02:21 +03:00
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-01 22:15:10 +03:00
|
|
|
"merch.originsDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"origins": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/merch.originItem"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-07 15:50:05 +03:00
|
|
|
"merch.updateMerchDTO": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"merch_uuid": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-03-01 22:15:10 +03:00
|
|
|
"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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|