v1.0.0-alpha.16
Pre-release
Pre-release
Removed (⚠️ breaking changes ⚠️ )
- the
enumset1
/enumset
optional dependency has been removed, as itsJsonSchema
impl did not actually match the default serialization format ofEnumSet
(#339)
Changed (⚠️ breaking changes ⚠️ )
- MSRV is now 1.70
- The
example
attribute value is now an arbitrary expression, rather than a string literal identifying a function to call. To avoid silent behaviour changes, the expression must not be a string literal where the value can be parsed as a function path - e.g.#[schemars(example = "foo")]
is now a compile error, but#[schemars(example = foo())]
is allowed (as is#[schemars(example = &"foo")]
if you want the the literal string value"foo"
to be the example). For newtype variants of internally-tagged enums, prefer referencing the inner type's schema viaDue to a publishing error, this change wasn't actually included in the published crate - this change was instead released in 1.0.0-alpha.17$ref
instead of always inlining the schema (#355)
Fixed
- The "deserialize" schema for
bytes::Bytes
/BytesMut
now allows strings, matching the actual deserialize behaviour of the types. - The schema for
either::Either
now matches the actual serialize/deserialize behaviour of that type.