logo
pub struct OpenApiService<T, W: ?Sized> { /* private fields */ }
Expand description

An OpenAPI service for Poem.

Implementations

Create an OpenAPI container.

Sets the webhooks.

Sets the summary of the API container.

Sets the description of the API container.

Sets a URL to the Terms of Service for the API.

Sets the contact information for the exposed API.

Sets the license information for the exposed API.

Reference: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#license-object

Add extra response header

Add extra request header

Sets the cookie key.

Create the Swagger UI endpoint.

Create the Swagger UI HTML

Create the Rapidoc endpoint.

Create the Rapidoc HTML

Create the Redoc endpoint.

Create the Redoc HTML

Create an endpoint to serve the open api specification as JSON.

Create an endpoint to serve the open api specification as YAML.

Returns the OAS specification file as JSON.

Returns the OAS specification file as YAML.

Trait Implementations

Represents the endpoint type.

Converts this object into endpoint.

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

Wrap the endpoint in a Box.

Use middleware to transform this endpoint. Read more

if enable is true then use middleware to transform this endpoint. Read more

Attach a state data to the endpoint, similar to with(AddData(T)). Read more

if data is Some(T) then attach the value to the endpoint.

Maps the request of this endpoint. Read more

Maps the output of this endpoint. Read more

Maps the request and response of this endpoint. Read more

Convert the output of this endpoint into a response. Response. Read more

Convert the output of this endpoint into a response. Response. Read more

Maps the response of this endpoint. Read more

Calls f if the result is Ok, otherwise returns the Err value of self. Read more

Catch all errors and convert it into a response. Read more

Catch the specified type of error and convert it into a response. Read more

Does something with each error. Read more

Does something with each specified error type. 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.

Should always be Self

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