enbbox 1.0.1

Notification infrastructure API — open-source alternative to Novu/Courier
Documentation
/*
 * enbbox API
 *
 * Notification infrastructure API — open-source alternative to Novu/Courier
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// DetailValue : `detail` field is either a string or an array of structured validation errors.
/// `detail` field is either a string or an array of structured validation errors.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DetailValue {
    /// Simple string detail (business errors, legacy validation).
    StringDetail(String),
    /// Structured validation errors (FastAPI-style).
    ValidationErrors(Vec<models::ValidationDetail>),
}

impl Default for DetailValue {
    fn default() -> Self {
        Self::StringDetail(Default::default())
    }
}