102 lines
2.4 KiB
JSON
102 lines
2.4 KiB
JSON
|
|
{
|
|||
|
|
"openapi": "3.0.0",
|
|||
|
|
"info": {
|
|||
|
|
"title": "Auth API",
|
|||
|
|
"version": "1.0.0"
|
|||
|
|
},
|
|||
|
|
"servers": [
|
|||
|
|
{
|
|||
|
|
"url": "https://api.example.com"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"paths": {
|
|||
|
|
"/auth/login": {
|
|||
|
|
"post": {
|
|||
|
|
"operationId": "AuthController_login",
|
|||
|
|
"summary": "Войти в систему",
|
|||
|
|
"requestBody": {
|
|||
|
|
"required": true,
|
|||
|
|
"content": {
|
|||
|
|
"application/json": {
|
|||
|
|
"schema": {
|
|||
|
|
"type": "object",
|
|||
|
|
"properties": {
|
|||
|
|
"email": {
|
|||
|
|
"type": "string"
|
|||
|
|
},
|
|||
|
|
"password": {
|
|||
|
|
"type": "string"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"required": ["email", "password"]
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"responses": {
|
|||
|
|
"200": {
|
|||
|
|
"description": "Успешная авторизация",
|
|||
|
|
"content": {
|
|||
|
|
"application/json": {
|
|||
|
|
"schema": {
|
|||
|
|
"type": "object",
|
|||
|
|
"properties": {
|
|||
|
|
"token": {
|
|||
|
|
"type": "string"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"401": {
|
|||
|
|
"description": "Неверные учетные данные"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"/profile": {
|
|||
|
|
"get": {
|
|||
|
|
"operationId": "ProfileController_get",
|
|||
|
|
"summary": "Получить профиль",
|
|||
|
|
"security": [
|
|||
|
|
{
|
|||
|
|
"bearer": []
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"responses": {
|
|||
|
|
"200": {
|
|||
|
|
"description": "Профиль пользователя",
|
|||
|
|
"content": {
|
|||
|
|
"application/json": {
|
|||
|
|
"schema": {
|
|||
|
|
"type": "object",
|
|||
|
|
"properties": {
|
|||
|
|
"id": {
|
|||
|
|
"type": "string"
|
|||
|
|
},
|
|||
|
|
"email": {
|
|||
|
|
"type": "string"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"401": {
|
|||
|
|
"description": "Не авторизован"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"components": {
|
|||
|
|
"securitySchemes": {
|
|||
|
|
"bearer": {
|
|||
|
|
"type": "http",
|
|||
|
|
"scheme": "bearer",
|
|||
|
|
"bearerFormat": "JWT"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|