5 releases (3 breaking)
0.4.0 | Nov 7, 2023 |
---|---|
0.3.0 | Oct 29, 2023 |
0.2.1 | Oct 12, 2020 |
0.2.0 | Oct 12, 2020 |
0.0.1 | Aug 9, 2019 |
#348 in Parser implementations
408 downloads per month
Used in 5 crates
140KB
3K
SLoC
OAS3
Structures and tools to parse, navigate and validate OpenAPI v3 Spec files.
Based on v3 parts of openapi crate by softprops.
Additional features:
- Validation constructors
- Example request/response validation
- Live API conformance testing
Install
add the following to your Cargo.toml
file
[dependencies]
oas3 = "0.4"
Usage
extern crate oas3;
fn main() {
match oas3::from_path("path/to/openapi.yaml") {
Ok(spec) => println!("spec: {:?}", spec),
Err(err) => println!("error: {}", err)
}
}
lib.rs
:
Structures and tools to parse, navigate and validate OpenAPI v3.1 specifications.
Example
match oas3::from_path("path/to/openapi.yaml") {
Ok(spec) => println!("spec: {:?}", spec),
Err(err) => println!("error: {}", err)
}
Dependencies
~8–23MB
~345K SLoC