pub struct OpenApiInfo { /* private fields */ }Expand description
Document metadata and where to publish it
Implementations§
Source§impl OpenApiInfo
impl OpenApiInfo
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sourcepub fn server(self, url: impl Into<String>) -> Self
pub fn server(self, url: impl Into<String>) -> Self
Add a server URL, e.g. https://api.example.com
Sourcepub fn spec_path(self, path: impl Into<String>) -> Self
pub fn spec_path(self, path: impl Into<String>) -> Self
Where the JSON document is served (default /openapi.json)
Sourcepub fn swagger_ui(self, path: impl Into<String>) -> Self
pub fn swagger_ui(self, path: impl Into<String>) -> Self
Also serve a Swagger UI page at path
Trait Implementations§
Source§impl Clone for OpenApiInfo
impl Clone for OpenApiInfo
Auto Trait Implementations§
impl Freeze for OpenApiInfo
impl RefUnwindSafe for OpenApiInfo
impl Send for OpenApiInfo
impl Sync for OpenApiInfo
impl Unpin for OpenApiInfo
impl UnsafeUnpin for OpenApiInfo
impl UnwindSafe for OpenApiInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more