backend: Pydantic response_models für 5 GET-Endpoints hinzufügen
- health.py: HealthResponse - eigenleben.py: EigenlebenOverviewResponse + SkillTextResponse - chronik.py: ChronikResponse + ChronikItem - wissen.py: WissenListResponse + WissenFileResponse - reminders.py: ReminderListResponse + ReminderOut py_compile bestanden, /docs zeigt neue Schemata. Response-Payloads unverändert — nur Typisierung hinzugefügt.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
"""Health-/Status-Endpoint — schlanker Lebenszeichen-Check für MC 2.0."""
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from config import VERSION
|
||||
@@ -8,7 +10,15 @@ from services import gateway, llamaswap
|
||||
router = APIRouter(prefix="/api")
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
class HealthResponse(BaseModel):
|
||||
status: str
|
||||
version: str
|
||||
engine_reachable: bool
|
||||
gateway_reachable: bool
|
||||
brain: dict
|
||||
|
||||
|
||||
@router.get("/health", response_model=HealthResponse)
|
||||
def health() -> dict:
|
||||
return {
|
||||
"status": "ok",
|
||||
|
||||
Reference in New Issue
Block a user