swagger docs update

This commit is contained in:
nquidox 2025-09-12 23:54:56 +03:00
parent 06d952c145
commit f07131264f
3 changed files with 53 additions and 40 deletions

View file

@ -104,11 +104,6 @@ const docTemplate = `{
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Регистрация нового пользователя",
"consumes": [
"application/json"
@ -182,13 +177,8 @@ const docTemplate = `{
}
}
},
"/user/login": {
"/user/auth/login": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Логин",
"consumes": [
"application/json"
@ -210,7 +200,10 @@ const docTemplate = `{
],
"responses": {
"200": {
"description": "OK"
"description": "OK",
"schema": {
"$ref": "#/definitions/user.LoginResponse"
}
},
"400": {
"description": "Bad Request",
@ -227,14 +220,14 @@ const docTemplate = `{
}
}
},
"/user/logout": {
"/user/auth/logout": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Логаут. Uuid юзера будет извлечен из токена.",
"description": "Логаут. Для логаута надо передать refresh token, он будет инвалидирован.",
"tags": [
"Users - auth"
],
@ -258,7 +251,7 @@ const docTemplate = `{
}
}
},
"/user/refresh": {
"/user/auth/refresh": {
"post": {
"security": [
{
@ -272,7 +265,10 @@ const docTemplate = `{
"summary": "Обновление аксесс токена по рефреш токену.",
"responses": {
"200": {
"description": "OK"
"description": "OK",
"schema": {
"$ref": "#/definitions/user.LoginResponse"
}
},
"400": {
"description": "Bad Request",
@ -343,6 +339,14 @@ const docTemplate = `{
}
}
},
"user.LoginResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
}
}
},
"user.Register": {
"type": "object",
"properties": {