use serde::Serialize;
use crate::error::ErrorVariant;
use crate::router::Router;
#[derive(Debug, Clone, Serialize, PartialEq)]
pub struct HeaderParamInfo {
pub name: String,
pub required: bool,
}
pub struct RouteDescriptor {
pub method: &'static str,
pub path: &'static str,
pub handler_name: &'static str,
pub is_public: bool,
pub response_schema: fn() -> Option<serde_json::Value>,
pub request_schema: fn() -> Option<serde_json::Value>,
pub request_content_type: fn() -> Option<&'static str>,
pub request_body_required: fn() -> Option<bool>,
pub error_responses: fn() -> Vec<ErrorVariant>,
pub header_parameters: fn() -> Vec<HeaderParamInfo>,
pub register: fn(Router) -> Router,
}
inventory::collect!(RouteDescriptor);
pub struct PublicMarker {
pub handler_name: &'static str,
}
inventory::collect!(PublicMarker);