https://github.com/sv-tools/roas
Rust OpenAPI Specification (v2, v3.0, v3.1)
https://github.com/sv-tools/roas
openapi openapi3 openapi31 rust swagger
Last synced: 9 months ago
JSON representation
Rust OpenAPI Specification (v2, v3.0, v3.1)
- Host: GitHub
- URL: https://github.com/sv-tools/roas
- Owner: sv-tools
- License: apache-2.0
- Created: 2023-10-02T21:40:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-30T19:03:01.000Z (9 months ago)
- Last Synced: 2025-04-30T19:36:26.993Z (9 months ago)
- Topics: openapi, openapi3, openapi31, rust, swagger
- Language: Rust
- Homepage:
- Size: 239 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# roas
Rust OpenAPI Specification (v2.0, v3.0.X and v3.1.X)
[](https://crates.io/crates/roas)
[](https://docs.rs/roas)
Parsing and generating OpenAPI Specification:
* [x] OpenAPI Specification v2.0
* [x] OpenAPI Specification v3.0.X
* [ ] OpenAPI Specification v3.1.X
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
roas = { version = "0.2", features = ["v3_0"] }
```
## Examples
```rust
use roas::v3_0::spec::Spec;
use roas::validation::{Options, Validate};
...
let spec = serde_json::from_str::(raw_json).unwrap();
spec.validate(Options::IgnoreMissingTags | Options::IgnoreExternalReferences).unwrap();
...
```