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.

info_description_headings_in_navbar: bool

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Converts self into a collection.

Should always be Self

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more