mod root_router {
// ... original code but remove aide specific attributes
pub fn make_router() -> aide::ApiRouter<Arc<AppState>> {
ApiRouter::new()
.api_route("/", get(index))
.api_route("/yay", post_with(yay, yay_docs))
.nest_api_service("/apiV1", api_router_1::make_router())
.nest_api_service("/apiV2", api_router_2::make_router())
}
}
Transform operations can be detected with this format SOME_ROUTE_FUNCTION_NAME_doc. The _doc at the end of a function name is what determine whether to use get or get_with. The aide::make_router attribute macro is the only one implemented. The other macros like the aide::post attribute macros are fake, but should be create for documentation purposes(panic if used outside of aide::make_router.
I have a poc on my local machine but with axum router. Are you interested if I work on this feature for aide?
Hi, I am experimenting on giving a rocket like experience but with axum, like so:
It would generate something like this:
Transform operations can be detected with this format
SOME_ROUTE_FUNCTION_NAME_doc
. The_doc
at the end of a function name is what determine whether to useget
orget_with
. Theaide::make_router
attribute macro is the only one implemented. The other macros like theaide::post
attribute macros are fake, but should be create for documentation purposes(panic if used outside ofaide::make_router
.I have a poc on my local machine but with axum router. Are you interested if I work on this feature for aide?