5 releases

0.2.3 Mar 18, 2024
0.2.2 Mar 15, 2024
0.2.1 Oct 30, 2023
0.2.0 Oct 30, 2023
0.1.0 Oct 22, 2023

#706 in Parser implementations

Download history 7/week @ 2024-09-24 3/week @ 2024-10-01

178 downloads per month

MIT/Apache

535KB
10K SLoC

roas

Rust OpenAPI Specification (v2.0, v3.0.X and v3.1.X)

crates.io docs.rs

Parsing and generating OpenAPI Specification:

  • OpenAPI Specification v2.0
  • OpenAPI Specification v3.0.X
  • OpenAPI Specification v3.0.0

Usage

Add this to your Cargo.toml:

[dependencies]
roas = { version = "0.2", features = ["v3_0"] } 

Examples

use roas::v3_0::spec::Spec;
use roas::validation::{Options, Validate};

...

let spec = serde_json::from_str::<Spec>(raw_json).unwrap();
spec.validate(Options::IgnoreMissingTags | Options::IgnoreExternalReferences).unwrap();

...


lib.rs:

OpenAPI Specification

Dependencies

~3.5–5.5MB
~99K SLoC