koprogo_api/infrastructure/web/handlers/
health.rs

1use actix_web::{get, HttpResponse, Responder};
2use serde_json::json;
3
4/// Health check endpoint
5///
6/// Returns system health status. No authentication required.
7#[utoipa::path(
8    get,
9    path = "/api/v1/health",
10    tag = "Health",
11    responses(
12        (status = 200, description = "System is healthy", body = serde_json::Value,
13            example = json!({"status": "ok", "service": "koprogo-api"}))
14    )
15)]
16#[get("/health")]
17pub async fn health_check() -> impl Responder {
18    HttpResponse::Ok().json(json!({
19        "status": "ok",
20        "service": "koprogo-api"
21    }))
22}