Тесты: часть 1

This commit is contained in:
2025-10-28 09:58:44 +03:00
parent 21c7ddfd54
commit 6bffe6a9e1
21 changed files with 2843 additions and 3 deletions

102
tests/fixtures/with-auth.json vendored Normal file
View File

@@ -0,0 +1,102 @@
{
"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"
}
}
}
}