Crates.io | openapiv3-paper |
lib.rs | openapiv3-paper |
version | 2.0.2 |
source | src |
created_at | 2024-10-20 16:41:15.355808 |
updated_at | 2024-10-20 16:48:19.918319 |
description | This crate provides data structures that represent the OpenAPI v3.0.x specification easily deserializable with serde. It's a fork from openapiv3 with a simple patch on top. |
homepage | https://github.com/paperclip-rs/openapiv3 |
repository | https://github.com/paperclip-rs/openapiv3 |
max_upload_size | |
id | 1416338 |
size | 4,079,995 |
This crate provides data structures that represent the OpenAPI v3.0.x specification. Note this does not cover OpenAPI v3.1 which was an incompatible change.
use serde_json;
use openapiv3::OpenAPI;
fn main() {
let data = include_str!("openapi.json");
let openapi: OpenAPI = serde_json::from_str(data).expect("Could not deserialize input");
println!("{:?}", openapi);
}
Schemas without a type will end up as any data type as per the specification and can have any parameters of any schema type. Some Open API documents don't include the type parameter it would be nice to try to derive the type but the crate as of right now meets my needs.
This crate is licensed under either of
Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.