use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RouteMetadata {
pub method: String,
pub path: String,
pub function_name: String,
pub module_path: String,
pub file_path: String,
pub signature: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub error_status: Option<Vec<u16>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StructMetadata {
pub name: String,
pub definition: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CollectedMetadata {
pub routes: Vec<RouteMetadata>,
pub structs: Vec<StructMetadata>,
}
impl CollectedMetadata {
pub fn new() -> Self {
Self {
routes: Vec::new(),
structs: Vec::new(),
}
}
}