Skip to content

v1.0.0-alpha.16

Pre-release
Pre-release
Compare
Choose a tag to compare
@GREsau GREsau released this 25 Nov 10:46
· 3 commits to master since this release

Removed (⚠️ breaking changes ⚠️)

  • the enumset1/enumset optional dependency has been removed, as its JsonSchema impl did not actually match the default serialization format of EnumSet (#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 via $ref instead of always inlining the schema (#355) Due 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

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.