diff --git a/CHANGELOG.md b/CHANGELOG.md index 42cd847..643be93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## **In-dev** - [0.8.1] ### Added: - `SchemaGenerator::definitions_mut()` which returns a mutable reference to the generator's schema definitions +- Implement `JsonSchema` for slices ### Changed: - Minimum supported rust version is now 1.37.0 diff --git a/schemars/src/json_schema_impls/sequences.rs b/schemars/src/json_schema_impls/sequences.rs index 632a01e..58bb8e7 100644 --- a/schemars/src/json_schema_impls/sequences.rs +++ b/schemars/src/json_schema_impls/sequences.rs @@ -57,10 +57,11 @@ macro_rules! set_impl { }; } - seq_impl!( JsonSchema for std::collections::BinaryHeap); -set_impl!( JsonSchema for std::collections::BTreeSet); -set_impl!( JsonSchema for std::collections::HashSet); seq_impl!( JsonSchema for std::collections::LinkedList); +seq_impl!( JsonSchema for [T]); seq_impl!( JsonSchema for Vec); seq_impl!( JsonSchema for std::collections::VecDeque); + +set_impl!( JsonSchema for std::collections::BTreeSet); +set_impl!( JsonSchema for std::collections::HashSet);