Rust

model

Module

The canonical model, apart from schemas (crate::schema): what a document describes, the same whichever OpenAPI version it was written in.

Contents

use utopia_openapi::Contact;
Rust
pub struct Contact

The info.contact object.

use utopia_openapi::Encoding;
Rust
pub struct Encoding

How one property of a multipart or form body is encoded.

use utopia_openapi::Example;
Rust
pub struct Example

A named example.

use utopia_openapi::ExternalDocumentation;
Rust
pub struct ExternalDocumentation

An externalDocs object.

use utopia_openapi::Header;
Rust
pub struct Header

A response or encoding header.

use utopia_openapi::Info;
Rust
pub struct Info

The info object.

use utopia_openapi::License;
Rust
pub struct License

The info.license object.

use utopia_openapi::MediaType;
Rust
pub struct MediaType

A body in one media type.

use utopia_openapi::OAuthFlow;
Rust
pub struct OAuthFlow

One OAuth flow.

use utopia_openapi::Operation;
Rust
pub struct Operation

One operation: a method on a path.

use utopia_openapi::Parameter;
Rust
pub struct Parameter

A parameter of an operation.

use utopia_openapi::PathItem;
Rust
pub struct PathItem

The operations available on one path.

use utopia_openapi::RequestBody;
Rust
pub struct RequestBody

The body of a request.

use utopia_openapi::Response;
Rust
pub struct Response

One response of an operation.

use utopia_openapi::SecurityRequirement;
Rust
pub struct SecurityRequirement

One security alternative: every scheme it names applies together, each with its OAuth scopes.

use utopia_openapi::SecurityScheme;
Rust
pub struct SecurityScheme

A security scheme.

use utopia_openapi::Server;
Rust
pub struct Server

A server the API is served from. OpenAPI 2.0's host, basePath and schemes become one server per scheme.

use utopia_openapi::ServerVariable;
Rust
pub struct ServerVariable

A placeholder of a server URL.

use utopia_openapi::Tag;
Rust
pub struct Tag

A tag, with its documentation.

use utopia_openapi::HttpMethod;
Rust
pub enum HttpMethod

An HTTP method an operation can use, in the order OpenAPI lists them.

use utopia_openapi::ParameterLocation;
Rust
pub enum ParameterLocation

Where a parameter is sent.

use utopia_openapi::SecuritySchemeType;
Rust
pub enum SecuritySchemeType

The kind of a security scheme.

Rust
pub type Map<T> = IndexMap<String, T>

A map keyed by names from the document, in document order.