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