Crates.io | roas |
lib.rs | roas |
version | 0.6.0 |
created_at | 2023-10-22 07:54:26.135449+00 |
updated_at | 2025-09-25 18:38:28.511363+00 |
description | Rust OpenAPI Specification |
homepage | https://github.com/sv-tools/roas |
repository | https://github.com/sv-tools/roas |
max_upload_size | |
id | 1010434 |
size | 917,001 |
Rust OpenAPI Specification (v2.0, v3.0.X and v3.1.X)
Parsing and generating OpenAPI Specification:
[!CAUTION] The project is in early development stage, so the API may change in the future. Consider any 0.x.x version as unstable and subject to breaking changes.
To use roas
, add it to your Cargo.toml
:
cargo add roas
or manually add the following lines:
[dependencies]
roas = "0.4"
use roas::v3_1::spec::Spec;
use roas::validation::{Options, Validate};
...
let spec = serde_json::from_str::<Spec>(raw_json).unwrap();
spec.validate(Options::IgnoreMissingTags | Options::IgnoreExternalReferences).unwrap();
...