openapi_kit_schema 0.0.7

OpenAPI Schema
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
mod error;

use std::path::Path;

pub use error::Error;

pub use openapiv3::*;

pub fn load<P: AsRef<Path>>(path: P) -> Result<OpenAPI, Error> {
    let file = std::fs::read_to_string(path).map_err(Error::Io)?;
    serde_yml::from_str(&file).map_err(Error::Serde)
}