Trait poem_openapi::OpenApi
source · pub trait OpenApi: Sized {
// Required methods
fn meta() -> Vec<MetaApi>;
fn register(registry: &mut Registry);
fn add_routes(
self,
route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>>
);
}
Expand description
Represents a OpenAPI object.
Required Methods§
sourcefn add_routes(
self,
route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>>
)
fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )
Adds all API endpoints to the routing object.