Struct Config

Source
pub struct Config {
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

Swagger UI configuration

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).

§max_displayed_tags: u32

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§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Config

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,