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