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 26 27 28 29 30 31 32 33 34 35
|
mod util;
use schemars::JsonSchema;
use util::*;
mod a {
use super::*;
#[allow(dead_code)]
#[derive(JsonSchema)]
pub struct Config {
test: String,
}
}
mod b {
use super::*;
#[allow(dead_code)]
#[derive(JsonSchema)]
pub struct Config {
test2: String,
}
}
#[allow(dead_code)]
#[derive(JsonSchema)]
pub struct Config2 {
a_cfg: a::Config,
b_cfg: b::Config,
}
#[test]
fn same_name() -> TestResult {
test_default_generated_schema::<Config2>("same_name")
}
|