pub struct DocsConfig {
pub docs_path: Option<String>,
pub redoc_path: Option<String>,
pub openapi_path: String,
pub title: String,
pub swagger_ui_parameters: Option<String>,
pub swagger_ui_init_oauth: Option<String>,
pub favicon_url: Option<String>,
pub swagger_cdn_url: String,
pub redoc_cdn_url: String,
}Expand description
Configuration for the API documentation endpoints.
Fields§
§docs_path: Option<String>Path for Swagger UI. Set to None to disable.
redoc_path: Option<String>Path for ReDoc. Set to None to disable.
openapi_path: StringPath for the OpenAPI JSON specification.
title: StringTitle shown in the documentation.
swagger_ui_parameters: Option<String>Swagger UI configuration parameters (JSON).
swagger_ui_init_oauth: Option<String>Swagger UI OAuth initialization config (JSON).
favicon_url: Option<String>Custom favicon URL.
swagger_cdn_url: StringCDN base URL for Swagger UI assets.
redoc_cdn_url: StringCDN base URL for ReDoc assets.
Implementations§
Source§impl DocsConfig
impl DocsConfig
Sourcepub fn docs_path(self, path: impl Into<Option<String>>) -> Self
pub fn docs_path(self, path: impl Into<Option<String>>) -> Self
Set the path for Swagger UI. Use None to disable.
Sourcepub fn redoc_path(self, path: impl Into<Option<String>>) -> Self
pub fn redoc_path(self, path: impl Into<Option<String>>) -> Self
Set the path for ReDoc. Use None to disable.
Sourcepub fn openapi_path(self, path: impl Into<String>) -> Self
pub fn openapi_path(self, path: impl Into<String>) -> Self
Set the path for the OpenAPI JSON specification.
Sourcepub fn swagger_ui_parameters(self, params: impl Into<String>) -> Self
pub fn swagger_ui_parameters(self, params: impl Into<String>) -> Self
Sourcepub fn swagger_ui_init_oauth(self, config: impl Into<String>) -> Self
pub fn swagger_ui_init_oauth(self, config: impl Into<String>) -> Self
Sourcepub fn favicon_url(self, url: impl Into<String>) -> Self
pub fn favicon_url(self, url: impl Into<String>) -> Self
Set a custom favicon URL.
Sourcepub fn swagger_cdn_url(self, url: impl Into<String>) -> Self
pub fn swagger_cdn_url(self, url: impl Into<String>) -> Self
Set the CDN base URL for Swagger UI assets.
Sourcepub fn redoc_cdn_url(self, url: impl Into<String>) -> Self
pub fn redoc_cdn_url(self, url: impl Into<String>) -> Self
Set the CDN base URL for ReDoc assets.
Trait Implementations§
Source§impl Clone for DocsConfig
impl Clone for DocsConfig
Source§fn clone(&self) -> DocsConfig
fn clone(&self) -> DocsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocsConfig
impl Debug for DocsConfig
Auto Trait Implementations§
impl Freeze for DocsConfig
impl RefUnwindSafe for DocsConfig
impl Send for DocsConfig
impl Sync for DocsConfig
impl Unpin for DocsConfig
impl UnwindSafe for DocsConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).