Expand description
Rust implementation of OpenAPI Spec v3.1.x
A lof the code was taken from utoipa.
The main difference is the full JSON Schema 2020-12 Definitions.
See the changelog for a full release history.
§Feature flags
docs— Enables changelog and documentation of feature flagsdebug— Enable derive(Debug) on all typesyaml— Enablesto_yamlfunction.
§Alternatives
openapiv3: Implements the openapi v3.0.x spec, does not implement full json schema draft 2020-12 spec.utoipa: A fully fletched openapi-type-generator implementing some of the v3.1.x spec.schemars: A fully fletched jsonschema-type-generator implementing some of the json schema draft 2020-12 spec.
§License
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0
Modules§
- content
- Implements content object for request body and response.
- encoding
- Implements encoding object for content.
- example
- Implements OpenAPI Example Object can be used to define examples for
Responses andRequestBodys. - extensions
- Implements OpenAPI Extensions.
- external_
docs - Implements OpenAPI External Docs Object types.
- header
- Implements OpenAPI Header Object types.
- info
- Implements OpenAPI Metadata types.
- link
- Implements Open API Link Object for responses.
- path
- Implements OpenAPI Path Object types.
- request_
body - Implements OpenAPI Request Body types.
- response
- Implements OpenApi Responses.
- schema
- Implements OpenAPI Schema Object types which can be used to define field properties, enum values, array or object types.
- security
- Implements OpenAPI Security Schema types.
- server
- Implements OpenAPI Server Object types to configure target servers.
- tag
- Implements OpenAPI Tag Object types.
- xml
- Implements OpenAPI Xml Object types.
- changelog
- Changelogs generated by scuffle_changelog
Re-exports§
pub use self::content::Content;pub use self::content::ContentBuilder;pub use self::external_docs::ExternalDocs;pub use self::header::Header;pub use self::header::HeaderBuilder;pub use self::info::Contact;pub use self::info::ContactBuilder;pub use self::info::Info;pub use self::info::InfoBuilder;pub use self::info::License;pub use self::info::LicenseBuilder;pub use self::path::HttpMethod;pub use self::path::PathItem;pub use self::path::Paths;pub use self::path::PathsBuilder;pub use self::response::Response;pub use self::response::ResponseBuilder;pub use self::response::Responses;pub use self::response::ResponsesBuilder;pub use self::schema::Components;pub use self::schema::ComponentsBuilder;pub use self::schema::Discriminator;pub use self::schema::Object;pub use self::schema::Ref;pub use self::schema::Schema;pub use self::schema::Type;pub use self::security::SecurityRequirement;pub use self::server::Server;pub use self::server::ServerBuilder;pub use self::server::ServerVariable;pub use self::server::ServerVariableBuilder;pub use self::tag::Tag;
Structs§
- OpenApi
- Root object of the OpenAPI document.
- Open
ApiBuilder - Use builder syntax to set the inputs and finish with
build().
Enums§
- Open
ApiVersion - Represents available OpenAPI versions.
- Deprecated
- Value used to indicate whether reusable schema, parameter or operation is deprecated.
- RefOr
- A
Refor some other typeT.