vector_config_common/schema/mod.rs
1// A significant portion of this code -- most all types in gen.rs, schema.rs, and visit.rs -- are
2// copied from the `schemars` crate. The license for `schemars` is included in `LICENSE-schemars`,
3// pursuant to the listed conditions in the license.
4
5mod gen;
6mod json_schema;
7pub mod visit;
8
9pub(crate) const DEFINITIONS_PREFIX: &str = "#/definitions/";
10
11// We have chosen the `BTree*` types here instead of hash tables to provide for a consistent
12// ordering of the output elements between runs and changes to the configuration.
13pub type Map<K, V> = std::collections::BTreeMap<K, V>;
14pub type Set<V> = std::collections::BTreeSet<V>;
15
16pub use self::gen::{SchemaGenerator, SchemaSettings};
17pub use self::json_schema::*;