Skip to content

sv-tools/roas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 (v2: old specification, disabled by default)
  • OpenAPI Specification v3.0.x (v3_0: default feature)
  • OpenAPI Specification v3.1.x (v3_1:; experimental and disabled by default)

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.

Usage

To use roas, add it to your Cargo.toml:

cargo add roas

or manually add the following lines:

[dependencies]
roas = "0.4"  

Examples

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

...

About

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

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages