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": {
"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": {