build_openapi

Function build_openapi 

Source
pub fn build_openapi<'openapi, F>(f: F) -> OpenApiWrapper<'openapi>
where F: Fn() -> OpenApiBuilder,
Expand description

Build the openapi spec. This function should be called after all the endpoints are defined. Because the openapi spec is cached, it’s cheap to call this function multiple times. The f function is called only when the openapi spec is not built yet.