Implement JsonSchema on indexmap types
This commit is contained in:
parent
8d0ccc89db
commit
fd42debc4d
8 changed files with 60 additions and 1 deletions
15
schemars/tests/indexmap.rs
Normal file
15
schemars/tests/indexmap.rs
Normal 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")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue