pub trait GetOpenapi {
    // Required methods
    fn openapi_spec(&mut self, path: &str);
    fn openapi_doc(&mut self, path: &str);
}
Expand description

This trait adds the openapi_spec and openapi_doc method to an OpenAPI-aware router.

Required Methods§

source

fn openapi_spec(&mut self, path: &str)

Register a GET route to path that returns the OpenAPI specification in JSON format.

source

fn openapi_doc(&mut self, path: &str)

Register a GET route to path that returns the OpenAPI documentation in HTML format.

Implementors§