1
0
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:
ksieuk 2023-09-29 15:38:41 +03:00
parent 3e36da6481
commit 3e0f0d07b0
3 changed files with 5 additions and 5 deletions

View File

@ -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")

View File

@ -1,6 +1,6 @@
from .base import * from .base import *
__all__ = [ __all__ = [
"HealthSchema", "HealthResponseModel",
"TokenSchema", "TokenSchema",
] ]

View File

@ -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="Схема доступности сервиса")