Skip to main content

openapi_route

Macro openapi_route 

Source
macro_rules! openapi_route {
    ($handler:path $(,)?) => { ... };
}
Available on crate features http and openapi only.
Expand description

Collects a handler’s route and schemas from its utoipa::path annotation.

Returns Result<OpenApiRoute<S>, OpenApiRouteError>. Qualified handler paths are supported. No separate get(handler) or #[openapi(paths(handler))] registration is needed.