mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-12-14 07:46:17 +00:00
fix rename schemas
This commit is contained in:
@@ -7,9 +7,9 @@ router = fastapi.APIRouter()
|
||||
|
||||
@router.get(
|
||||
"/",
|
||||
response_model=api_shemas.HealthSchema,
|
||||
response_model=api_shemas.HealthResponseModel,
|
||||
summary="Статус работоспособности",
|
||||
description="Проверяет доступность сервиса FastAPI.",
|
||||
)
|
||||
async def health():
|
||||
return api_shemas.HealthSchema(status="healthy")
|
||||
return api_shemas.HealthResponseModel(status="healthy")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from .base import *
|
||||
|
||||
__all__ = [
|
||||
"HealthSchema",
|
||||
"HealthResponseModel",
|
||||
"TokenSchema",
|
||||
]
|
||||
|
||||
@@ -3,10 +3,10 @@ import uuid
|
||||
import pydantic
|
||||
|
||||
|
||||
class TokenSchema(pydantic.BaseModel):
|
||||
class TokenResponseModel(pydantic.BaseModel):
|
||||
sub: uuid.UUID
|
||||
exp: int | None = None
|
||||
|
||||
|
||||
class HealthSchema(pydantic.BaseModel):
|
||||
class HealthResponseModel(pydantic.BaseModel):
|
||||
status: str = pydantic.Field(..., example="healthy", description="Схема доступности сервиса")
|
||||
|
||||
Reference in New Issue
Block a user