specta-jsonschema 0.0.3

Export your Rust types to a JSON Schema
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Controls how JSON schemas are organized in output
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Layout {
    /// Single file with all types in $defs section (default)
    /// All type definitions are placed in a single JSON file under the
    /// definitions/$defs key.
    SingleFile,

    /// Separate .json file per type, organized by module path
    /// Each type gets its own file like: `my_module/MyType.schema.json`
    Files,
}

impl Default for Layout {
    fn default() -> Self {
        Self::SingleFile
    }
}