#openapi #oas3 #swagger #oas #api

oas3

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

21 releases (breaking)

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

#196 in Parser implementations

Download history 1457/week @ 2025-01-13 1201/week @ 2025-01-20 1551/week @ 2025-01-27 1405/week @ 2025-02-03 1072/week @ 2025-02-10 1004/week @ 2025-02-17 1040/week @ 2025-02-24 712/week @ 2025-03-03 1268/week @ 2025-03-10 866/week @ 2025-03-17 798/week @ 2025-03-24 862/week @ 2025-03-31 630/week @ 2025-04-07 635/week @ 2025-04-14 1795/week @ 2025-04-21 1367/week @ 2025-04-28

4,450 downloads per month
Used in 11 crates (10 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.5–8MB
~144K SLoC