roas

Crates.ioroas
lib.rsroas
version0.2.3
sourcesrc
created_at2023-10-22 07:54:26.135449
updated_at2024-03-18 21:02:48.323144
descriptionRust OpenAPI Specification
homepagehttps://github.com/sv-tools/roas
repositoryhttps://github.com/sv-tools/roas
max_upload_size
id1010434
size552,022
Sergey Vilgelm (SVilgelm)

documentation

README

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();

...

Commit count: 36

cargo fmt