"""Health and version endpoints required by AppFactory.""" from __future__ import annotations from fastapi import APIRouter from ..config import get_settings from ..models import HealthResponse from ..services.calendars import library_version router = APIRouter(tags=["service"]) @router.get("/health", response_model=HealthResponse, summary="Stav sluzby") def health() -> HealthResponse: settings = get_settings() return HealthResponse( status="ok", app=settings.app_name, version=settings.app_version, holidays_library=library_version(), default_country=settings.default_country, ) @router.get("/version", summary="Verze a zakladni informace o sluzbe") def version() -> dict: settings = get_settings() return { "app": settings.app_name, "version": settings.app_version, "language": "python", "root_path": settings.root_path, "holidays_library": library_version(), }