#openapi #swagger #oas3 #oas

oas3

Structures and tools to parse, navigate, and validate OpenAPI v3.1 specifications

21 releases (breaking)

new 0.16.1 Apr 25, 2025
0.15.0 Feb 10, 2025
0.13.1 Dec 29, 2024
0.12.1 Oct 11, 2024
0.0.1 Aug 9, 2019

#283 in Parser implementations

Download history 1608/week @ 2025-01-03 1486/week @ 2025-01-10 1297/week @ 2025-01-17 1516/week @ 2025-01-24 1362/week @ 2025-01-31 1196/week @ 2025-02-07 1065/week @ 2025-02-14 1102/week @ 2025-02-21 634/week @ 2025-02-28 1259/week @ 2025-03-07 748/week @ 2025-03-14 1030/week @ 2025-03-21 768/week @ 2025-03-28 672/week @ 2025-04-04 695/week @ 2025-04-11 1247/week @ 2025-04-18

3,484 downloads per month
Used in 10 crates (9 directly)

MIT license

140KB
1.5K SLoC

oas3

crates.io Documentation dependency status MIT or Apache 2.0 licensed
CI codecov Version Download

Structures and tools to parse, navigate and validate OpenAPI v3.1 specifications.

Note that due to v3.1 being a breaking change from v3.0, you may have trouble correctly parsing specs in the older format.

Example

let yaml = std::fs::read_to_string("path/to/openapi.yml").unwrap();

match oas3::from_yaml(yaml) {
  Ok(spec) => println!("spec: {:?}", spec),
  Err(err) => println!("error: {}", err)
}

Dependencies

~5–8MB
~142K SLoC