swagger docs update
This commit is contained in:
parent
f7ec1bce1e
commit
565e019a67
3 changed files with 762 additions and 0 deletions
|
|
@ -271,6 +271,254 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/merch/labels": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Получить все метки товаров",
|
||||
"tags": [
|
||||
"Merch labels"
|
||||
],
|
||||
"summary": "Получить все метки товаров",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/merch.LabelsList"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Создать новую метку для товара",
|
||||
"tags": [
|
||||
"Merch labels"
|
||||
],
|
||||
"summary": "Создать новую метку для товара",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.LabelDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/labels/attach": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Прикрепить метку к товару",
|
||||
"tags": [
|
||||
"Merch labels"
|
||||
],
|
||||
"summary": "Прикрепить метку к товару",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.LabelLink"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/labels/detach": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Удалить привязку метки к товару",
|
||||
"tags": [
|
||||
"Merch labels"
|
||||
],
|
||||
"summary": "Удалить привязку метки к товару",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.LabelLink"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/labels/{uuid}": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Изменить метку",
|
||||
"tags": [
|
||||
"Merch labels"
|
||||
],
|
||||
"summary": "Изменить метку",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "label uuid",
|
||||
"name": "uuid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.LabelDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Пометить метку как удаленную",
|
||||
"tags": [
|
||||
"Merch labels"
|
||||
],
|
||||
"summary": "Пометить метку как удаленную",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "label uuid",
|
||||
"name": "uuid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse400"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.ErrorResponse500"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/{uuid}": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
|
@ -773,6 +1021,48 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.LabelDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bg_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.LabelLink": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"merch_uuid": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.LabelsList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bg_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "string"
|
||||
},
|
||||
"label_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.ListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue