export_app!() { /* proc-macro */ }Expand description
Export a vespera app as a reusable component.
Generates a struct with:
OPENAPI_SPEC: &'static str- The OpenAPI JSON specrouter() -> Router- Function returning the Axum router
§Example
ⓘ
// Simple - uses "routes" folder by default
vespera::export_app!(MyApp);
// Custom directory
vespera::export_app!(MyApp, dir = "api");
// Generates:
// pub struct MyApp;
// impl MyApp {
// pub const OPENAPI_SPEC: &'static str = "...";
// pub fn router() -> axum::Router { ... }
// }