Implement JsonSchema on indexmap types

This commit is contained in:
Graham Esau 2019-12-27 21:44:50 +00:00
parent 8d0ccc89db
commit fd42debc4d
8 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,15 @@
mod util;
use indexmap::{IndexMap, IndexSet};
use schemars::JsonSchema;
use util::*;
#[derive(Debug, JsonSchema)]
struct IndexMapTypes {
map: IndexMap<i32, bool>,
set: IndexSet<isize>,
}
#[test]
fn chrono_types() -> TestResult {
test_default_generated_schema::<IndexMapTypes>("indexmap")
}