Struct rocket_okapi::rapidoc::HideShowConfig
source · [−]pub struct HideShowConfig {
pub show_info: bool,
pub info_description_headings_in_navbar: bool,
pub show_components: bool,
pub show_header: bool,
pub allow_authentication: bool,
pub allow_spec_url_load: bool,
pub allow_spec_file_load: bool,
pub allow_search: bool,
pub allow_try: bool,
pub allow_server_selection: bool,
pub allow_schema_description_expand_toggle: bool,
}
Expand description
Used to configure what features to hide or show.
Fields
show_info: bool
show/hide the documents info section Info section contains information about the spec, such as the title and description of the spec, the version, terms of services etc. In certain situation you may not need to show this section. For instance you are embedding this element inside a another help document. Chances are, the help doc may already have this info, in that case you may want to hide this section.
The default is true
.
Include headers from info -> description section to the Navigation bar (applies to read mode only) Will get the headers from the markdown in info - description (h1 and h2) into the menu on the left (in read mode) along with links to them. This option allows users to add navigation bar items using Markdown.
The default is false
.
show_components: bool
show/hide the components section both in document and menu Will show the components section along with schemas, responses, examples, requestBodies, headers, securitySchemes, links and callbacks Also will be shown in the menu on the left (in read mode)
The default is false
.
show_header: bool
show/hide the header.
If you do not want your user to open any other api spec, other than the current one, then
set this attribute to false
.
The default is true
.
allow_authentication: bool
Authentication feature, allows the user to select one of the authentication mechanism thats available in the spec. It can be http-basic, http-bearer or api-key. If you do not want your users to go through the authentication process, instead want them to use a pre-generated api-key then you may hide authentication section by setting this attribute to false and provide the api-key details using various api-key-???? attributes.
The default is true
.
allow_spec_url_load: bool
If set to false
, user will not be able to load any spec url from the UI.
The default is true
.
allow_spec_file_load: bool
If set to ‘false’, user will not be able to load any spec file from the local drive. This attribute is applicable only when the device width is more than 768px, else this feature is not available.
The default is true
.
allow_search: bool
If set to false
, user will not be able to search APIs.
The default is true
.
allow_try: bool
‘TRY’ feature allows you to make REST calls to the API server. To disable this feature set it to false Setting it to false will also hide API-Servers if specified in the spec.
The default is true
.
allow_server_selection: bool
If set to ‘false’, user will not be able to see or select API server (Server List will be hidden, however users will be able to see the server url near the ‘TRY’ button, to know in advance where the TRY will send the request). The URL specified in the server-url attribute will be used if set, else the first server in the API specification file will be used.
The default is true
.
allow_schema_description_expand_toggle: bool
Allow or hide the ability to expand/collapse field descriptions in the schema.
The default is true
.
Trait Implementations
sourceimpl Clone for HideShowConfig
impl Clone for HideShowConfig
sourcefn clone(&self) -> HideShowConfig
fn clone(&self) -> HideShowConfig
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 HideShowConfig
impl Debug for HideShowConfig
Auto Trait Implementations
impl RefUnwindSafe for HideShowConfig
impl Send for HideShowConfig
impl Sync for HideShowConfig
impl Unpin for HideShowConfig
impl UnwindSafe for HideShowConfig
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