swagger docs update

This commit is contained in:
nquidox 2025-07-07 17:49:34 +03:00
parent 28da81ea59
commit 51ee003b24
3 changed files with 309 additions and 0 deletions

View file

@ -173,6 +173,113 @@
}
}
}
},
"/user/login": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Логин",
"consumes": [
"application/json"
],
"tags": [
"Users - auth"
],
"summary": "Логин",
"parameters": [
{
"description": "логин",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.Login"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
}
},
"/user/logout": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Логаут. Uuid юзера будет извлечен из токена.",
"tags": [
"Users - auth"
],
"summary": "Логаут",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
}
},
"/user/refresh": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Принимает рефреш токен в заголовке Authorization",
"tags": [
"Users - auth"
],
"summary": "Обновление аксесс токена по рефреш токену.",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse400"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse500"
}
}
}
}
}
},
"definitions": {
@ -217,6 +324,17 @@
}
}
},
"user.Login": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"user.Register": {
"type": "object",
"properties": {