Struct rocket_okapi::swagger_ui::SwaggerUIConfig
source · [−]pub struct SwaggerUIConfig {Show 13 fields
pub url: String,
pub urls: Vec<UrlObject>,
pub deep_linking: bool,
pub display_operation_id: bool,
pub default_models_expand_depth: i32,
pub default_model_expand_depth: i32,
pub default_model_rendering: DefaultModelRendering,
pub display_request_duration: bool,
pub doc_expansion: DocExpansion,
pub filter: Filter,
pub max_displayed_tags: u32,
pub show_extensions: bool,
pub show_common_extensions: bool,
}
Expand description
A struct containing information about where and how the openapi.json
files are served.
Fields
url: String
The url to a single openapi.json
file that is showed when the web ui is first opened.
urls: Vec<UrlObject>
A list of named urls that contain all the openapi.json
files that you want to display in
your web ui. If this field is populated, the url
field is not used.
deep_linking: bool
If set to true, enables deep linking for tags and operations. See the
Deep Linking documentation
for more information.
Default: false
.
display_operation_id: bool
Controls the display of operationId in operations list.
Default: false
.
default_models_expand_depth: i32
The default expansion depth for models (set to -1 completely hide the models).
Default: 1
.
default_model_expand_depth: i32
The default expansion depth for the model on the model-example section.
Default: 1
.
default_model_rendering: DefaultModelRendering
Controls how the model is shown when the API is first rendered. (The user can always switch
the rendering for a given model by clicking the ‘Model’ and ‘Example Value’ links.)
Default: DefaultModelRendering::Example
.
display_request_duration: bool
Controls the display of the request duration (in milliseconds) for “Try it out” requests.
Default: false
.
doc_expansion: DocExpansion
Controls the default expansion setting for the operations and tags.
Default: DocExpansion::List
.
filter: Filter
If set, enables filtering. The top bar will show an edit box that you can use to filter the
tagged operations that are shown. Filtering is case sensitive matching the filter expression
anywhere inside the tag.
Default: Filter(false)
.
If set, limits the number of tagged operations displayed to at most this many. The default
is to show all operations.
Default: None
(displays all tagged operations).
show_extensions: bool
Controls the display of vendor extension (x-
) fields and values for Operations,
Parameters, and Schema.
Default: false
.
show_common_extensions: bool
Controls the display of extensions (pattern
, maxLength
, minLength
, maximum
,
minimum
) fields and values for Parameters.
Default: false
.
Trait Implementations
sourceimpl Clone for SwaggerUIConfig
impl Clone for SwaggerUIConfig
sourcefn clone(&self) -> SwaggerUIConfig
fn clone(&self) -> SwaggerUIConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SwaggerUIConfig
impl Debug for SwaggerUIConfig
sourceimpl Default for SwaggerUIConfig
impl Default for SwaggerUIConfig
sourceimpl<'de> Deserialize<'de> for SwaggerUIConfig
impl<'de> Deserialize<'de> for SwaggerUIConfig
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for SwaggerUIConfig
impl Serialize for SwaggerUIConfig
Auto Trait Implementations
impl RefUnwindSafe for SwaggerUIConfig
impl Send for SwaggerUIConfig
impl Sync for SwaggerUIConfig
impl Unpin for SwaggerUIConfig
impl UnwindSafe for SwaggerUIConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
F: FnMut(T) -> U,
A: Array<Item = U>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more