arazzo-models
Rust models for the Arazzo Open API specification
Loading the models from YAML
You can create a Specification document with the following snippet. This requires the yaml
feature flag enabled and uses the yaml-rust2 crate.
use fs;
use ArazzoDescription;
use YamlLoader;
Loading the models from JSON
You can create a Specification document with the following snippet. This requires the json
feature flag enabled and uses the serde_json crate.
use File;
use BufReader;
use ArazzoDescription;
use Value;
Crate features
All features are enabled by default
yaml: Enables loading the models from a YAML document (uses yaml-rust2 crate)json: Enables loading the models from a JSON document (uses serde_json crate)
Note on the Arazzo Specification and Any types
The specification has constructs like Any | {expression}. This crate only supports values for
Any that can be expressed in JSON form.