1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![allow(clippy::large_enum_variant)]

pub type Map<K, V> = std::collections::BTreeMap<K, V>;
pub type Set<T> = std::collections::BTreeSet<T>;

mod error;
mod json_schema_impls;
#[macro_use]
mod macros;

pub mod gen;
pub mod schema;

pub use error::*;
pub use schemars_derive::*;

pub trait JsonSchema {
    fn is_referenceable() -> bool {
        true
    }

    fn schema_name() -> String;

    fn json_schema(gen: &mut gen::SchemaGenerator) -> Result;
}