Releases: GREsau/schemars
Releases · GREsau/schemars
v0.8.8
v0.8.7
v0.8.6
v0.8.5
v0.8.4
v0.8.3
v0.8.2
Added:
- Enable generating a schema from any serializable value using
schema_for_value!(...)
macro orSchemaGenerator::root_schema_for_value()
/SchemaGenerator::into_root_schema_for_value()
methods (#75) #[derive(JsonSchema_repr)]
can be used on C-like enums for generating a serde_repr-compatible schema (#76)- Implement
JsonSchema
forurl::Url
(#63)
v0.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
- Deriving JsonSchema on enums now sets
additionalProperties
to false on generated schemas wherever serde doesn't accept unknown properties. This includes non-unit variants of externally tagged enums, and struct-style variants of all enums that have thedeny_unknown_fields
attribute. - Schemas for HashSet and BTreeSet now have
uniqueItems
set to true (#64)
Fixed
v0.8.0
Added:
visit::Visitor
, a trait for updating a schema and all schemas it contains recursively. ASchemaSettings
can now contain a list of visitors.into_object()
method added toSchema
as a shortcut forinto::<SchemaObject>()
- Preserve order of schema properties under
preserve_order
feature flag (#32) SchemaGenerator::take_definitions()
which behaves similarly to the now-removedinto_definitions()
method but without consuming the generatorSchemaGenerator::visitors_mut()
which returns an iterator over a generator's settings's visitorsSchemaSettings::inline_subschemas
- enforces inlining of all subschemas instead of using references (#44)
Removed (BREAKING CHANGES):
SchemaSettings::bool_schemas
- this has been superseded by theReplaceBoolSchemas
visitorSchemaSettings::allow_ref_siblings
- this has been superseded by theRemoveRefSiblings
visitorSchemaSettings
no longer implementsPartialEq
SchemaGenerator::into_definitions()
- this has been superseded bySchemaGenerator::take_definitions()
Changed:
- BREAKING CHANGE Minimum supported rust version is now 1.36.0
Fixed:
- BREAKING CHANGE unknown items in
#[schemars(...)]
attributes now cause a compilation error (#18)