pub struct GeneralConfig {
    pub spec_urls: Vec<UrlObject>,
    pub sort_tags: bool,
    pub sort_endpoints_by: SortEndpointsBy,
    pub heading_text: String,
    pub goto_path: String,
    pub fill_request_fields_with_example: bool,
}
Expand description

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

Fields

spec_urls: Vec<UrlObject>

Urls of the OpenAPI spec to view.

This field must be manually filled with at least one element. More then one element is currently not supported yet, but can be used with custom HTML.

sort_tags: bool

To list tags in alphabetic order, otherwise tags will be ordered based on how it is specified under the tags section in the spec.

The default is false.

sort_endpoints_by: SortEndpointsBy

Sort endpoints within each tags by path or method.

The default is SortEndpointsBy::Path.

heading_text: String

Heading Text on top-left corner.

goto_path: String

Initial location on the document(identified by method and path) where you want to go after the spec is loaded. goto_path should be in the form of {method}-{path}. For instance you want to scrollTo “GET /user/login” you should provide the location as get-/user/login.

fill_request_fields_with_example: bool

Request fields will be filled with example value (if provided in spec).

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