19 lines
404 B
Python
19 lines
404 B
Python
from fastapi import APIRouter, status
|
|
from pydantic import BaseModel
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
class HealthResponse(BaseModel):
|
|
status: str
|
|
|
|
|
|
@router.get(
|
|
"",
|
|
response_model=HealthResponse,
|
|
status_code=status.HTTP_200_OK,
|
|
summary="Health check endpoint",
|
|
description="Check if the API is running",
|
|
)
|
|
async def health_check() -> HealthResponse:
|
|
return HealthResponse(status="ok") |