use std::collections::HashMap; use serde::Serialize; use utoipa::ToSchema; #[derive(Serialize, ToSchema)] pub struct ApiErrorResponse { pub message: String, } #[derive(Serialize, ToSchema)] pub struct ValidationErrorResponse { pub message: String, pub details: T, } pub type ParamsErrorResponse = ValidationErrorResponse>>>; impl From for ValidationErrorResponse { fn from(t: T) -> Self { Self { message: "Validation error".to_string(), details: t, } } }