pub struct RapiDocConfig {
    pub title: Option<String>,
    pub general: GeneralConfig,
    pub ui: UiConfig,
    pub nav: NavConfig,
    pub layout: LayoutConfig,
    pub hide_show: HideShowConfig,
    pub api: ApiConfig,
    pub slots: SlotsConfig,
    pub custom_html: Option<String>,
    pub custom_template_tags: HashMap<String, String>,
}
Expand description

A struct containing information about where and how the openapi.json files are served.

Fields

title: Option<String>

Webpage title. An optional title for the webpage. If set to None we will create a default title.

general: GeneralConfig

General settings. The spec_urls property must be specified by the user.

ui: UiConfig

Settings related to the ui and theming.

nav: NavConfig

Settings related to the nav bar.

layout: LayoutConfig

Settings relatd to the layout of the displayed docs.

hide_show: HideShowConfig

Settings used to control what features should or should not be displayed.

api: ApiConfig

Settings used to configure access to the api.

slots: SlotsConfig

Settings to configure the Rapi Doc “slots”.

custom_html: Option<String>

Provide a custom HTML file content. The templated values will still be replaced. So other settings can still be used. Use ../rapidoc/index.html as an example.

custom_template_tags: HashMap<String, String>

A list of custom tags that can be used in combination with custom_html. This allows for additional custom template tags that will be replaced in the html. The key should be the name of the tag without the brackets, {{key}}. The value will be the text the value will be replaced with.

The custom tags are replaced before all other tags, this allows for more flexibility but also means that you can break things. If you want to be sure to not overlap with existing tags, prefix your custom tags with _, c_ or C_. We will never use these prefixes in the provided tags.

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