diff --git a/src/meta_plugin/hostname.rs b/src/meta_plugin/hostname.rs index 9fa8b41..d02a61c 100644 --- a/src/meta_plugin/hostname.rs +++ b/src/meta_plugin/hostname.rs @@ -1,9 +1,20 @@ use crate::meta_plugin::{MetaPlugin, MetaPluginType}; -#[derive(Debug, Clone, Default)] +use smart_default::SmartDefault; + +#[derive(Debug, Clone, SmartDefault)] pub struct HostnameMetaPlugin { + #[default = false] is_finalized: bool, + #[default(std::collections::HashMap::new())] outputs: std::collections::HashMap, + #[default({ + let mut map = std::collections::HashMap::new(); + map.insert("hostname".to_string(), serde_yaml::Value::String("true".to_string())); + map.insert("hostname_full".to_string(), serde_yaml::Value::Bool(true)); + map.insert("hostname_short".to_string(), serde_yaml::Value::Bool(true)); + map + })] options: std::collections::HashMap, } diff --git a/src/modes/server/common.rs b/src/modes/server/common.rs index 6034468..a8bc4b4 100644 --- a/src/modes/server/common.rs +++ b/src/modes/server/common.rs @@ -32,7 +32,7 @@ pub struct AppState { pub item_service: Arc, } -#[derive(Serialize, Deserialize, ToSchema)] +#[derive(Debug, Serialize, Deserialize, ToSchema)] #[schema(description = "Standard API response wrapper containing success status, data payload, and error information")] pub struct ApiResponse { pub success: bool,