discover_endpoints!() { /* proc-macro */ }Expand description
Discovers and registers all endpoint modules in a directory
This macro scans the specified directory for .rs files (excluding mod.rs), parses each file to find handler functions with #[utoipa::path] attributes, and automatically generates everything needed for registration
ยงExample
In your endpoints/mod.rs:
microkit::discover_endpoints!("src/endpoints");Then in your main lib.rs:
endpoints::init_endpoints(&mut service)?;