Implement JsonSchema for Range/RangeInclusive

This commit is contained in:
Graham Esau 2019-10-27 22:30:01 +00:00
parent b334bef91a
commit fe861ac3a1
10 changed files with 203 additions and 50 deletions

View file

@ -7,7 +7,13 @@ struct MyStruct {
foo: i32,
}
#[derive(Debug, JsonSchema)]
struct Container {
result1: Result<MyStruct, Vec<String>>,
result2: Result<bool, ()>,
}
#[test]
fn result() -> TestResult {
test_default_generated_schema::<Result<MyStruct, Vec<String>>>("result")
test_default_generated_schema::<Container>("result")
}