Trait gotham_restful::GetOpenapi
source · pub trait GetOpenapi {
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§
sourcefn openapi_spec(&mut self, path: &str)
fn openapi_spec(&mut self, path: &str)
Register a GET route to path
that returns the OpenAPI specification in JSON format.
sourcefn openapi_doc(&mut self, path: &str)
fn openapi_doc(&mut self, path: &str)
Register a GET route to path
that returns the OpenAPI documentation in HTML format.