pub struct OpenApiBuilder { /* private fields */ }
Expand description

Builder for OpenApi with chainable configuration methods to create a new OpenApi.

Examples

Create OpenApi using OpenApiBuilder.

let openapi = OpenApiBuilder::new()
     .info(Info::new("My api", "1.0.0"))
     .paths(Paths::new())
     .components(Some(
         Components::new()
     ))
     .build();

Implementations

Constructs a new OpenApiBuilder.

Constructs a new OpenApi taking all fields values from this object.

Add Info metadata of the API.

Add iterator of Servers to configure target servers.

Add Paths to configure operations and endpoints of the API.

Add Components to configure reusable schemas.

Add iterator of SecurityRequirements that are globally available for all operations.

Add iterator of Tags to add additional documentation for operations tags.

Add ExternalDocs for referring additional documentation.

Trait Implementations

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

Converts to this type from the input type.

Converts to this type from the input type.

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.

Calls U::from(self).

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

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.