feat(backend): add swagger-ui endpoint via utoipa

This commit is contained in:
2026-06-24 19:22:39 +03:00
parent d153e1c251
commit a40c1f7396
7 changed files with 373 additions and 11 deletions

View File

@@ -1,9 +1,21 @@
use axum::{Router, routing::get};
use utoipa::OpenApi;
#[derive(OpenApi)]
#[openapi(paths(health))]
pub struct HealthApi;
pub fn routes_health() -> Router {
Router::new().route("/health", get(health))
}
/// Health check
#[utoipa::path(
get,
path = "/health",
tag = "health",
responses((status = 200, description = "Service is healthy"))
)]
async fn health() -> &'static str {
"up"
}