use std::any::TypeId;
use galvyn_core::router::RouteMetadata;
#[derive(Debug, Clone, Default)]
pub struct OpenapiMetadata {
pub tags: Vec<&'static str>,
pub pages: Vec<TypeId>,
}
impl RouteMetadata for OpenapiMetadata {
fn merge(&mut self, other: &Self) {
for tag in &other.tags {
if !self.tags.contains(tag) {
self.tags.push(tag);
}
}
for page in &other.pages {
if !self.pages.contains(page) {
self.pages.push(*page);
}
}
}
}