[−][src]Crate openapi
Openapi provides structures and support for serializing and deserializing openapi specifications
Examples
Typical use deserialing an existing to a persisted spec to rust form or visa versa
The hyper client should be configured with tls.
extern crate openapi; fn main() { match openapi::from_path("path/to/openapi.yaml") { Ok(spec) => println!("spec: {:?}", spec), Err(err) => println!("error: {}", err) } }
Errors
Operations typically result in a Result
type, an alias for
std::result::Result
with the Err
type fixed to Error
,
which implements std::error::Error
.
Re-exports
pub use error::Error; |
Modules
error | Error types |
v2 | Support for OpenApi version 2.0 specification. |
v3_0 | Support for OpenApi version 3.0.1 specification. |
Enums
OpenApi | Supported versions of the OpenApi. |
Functions
from_path | deserialize an open api spec from a path |
from_reader | deserialize an open api spec from type which implements Read |
to_json | serialize to a json string |
to_yaml | serialize to a yaml string |
Type Definitions
Result |