File size: 595 Bytes
557ab38 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | """Health + root routes.
GET / -> service banner (name, version, docs link)
GET /health -> {"status": "ok"} — probe target for orchestrators
"""
from __future__ import annotations
from fastapi import APIRouter
router = APIRouter(tags=["health"])
SERVICE_NAME = "structured-data-extraction"
SERVICE_VERSION = "0.1.0"
@router.get("/")
def root() -> dict:
return {
"service": SERVICE_NAME,
"version": SERVICE_VERSION,
"docs": "/docs",
"openapi": "/openapi.json",
}
@router.get("/health")
def health() -> dict:
return {"status": "ok"}
|