Skip to main content

generate

Function generate 

Source
pub fn generate<F>(router: &Router, options: &Options, filter: F) -> Value
where F: Fn(&str) -> bool,
Expand description

Walk router and emit an OpenAPI 3.1 Value. filter is consulted with the mount path of each controller (no leading or trailing slash); only routes from controllers whose mount passes are included.

See the module docs for the mapping conventions and the limitations on rest parameters / response schemas.