feat: add smart default for hostname meta plugin and debug for api response
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -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<String, serde_yaml::Value>,
|
||||
#[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<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ pub struct AppState {
|
||||
pub item_service: Arc<ItemService>,
|
||||
}
|
||||
|
||||
#[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<T> {
|
||||
pub success: bool,
|
||||
|
||||
Reference in New Issue
Block a user