Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 3 hours 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-08T20:01:41.000Z (9 days ago)
- Last Synced: 2024-11-09T08:19:41.643Z (9 days ago)
- Topics: openapi, openapi3, openapi31, rust, swagger
- Language: Rust
- Homepage:
- Size: 181 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
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)
[![crates.io](https://img.shields.io/crates/v/roas.svg)](https://crates.io/crates/roas)
[![docs.rs](https://docs.rs/roas/badge.svg)](https://docs.rs/roas)Parsing and generating OpenAPI Specification:
* [x] OpenAPI Specification v2.0
* [x] OpenAPI Specification v3.0.X
* [ ] OpenAPI Specification v3.0.0## 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();...
```