Files
api-codegen/tests/fixtures/with-auth.json
2025-10-28 09:58:44 +03:00

102 lines
2.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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