v1.0.0-alpha.15
Pre-release
Pre-release
Added
SchemaSettings
now has acontract
field which determines whether the generated schemas describe how types are serialized or deserialized. By default, this is set toDeserialize
, as this more closely matches the behaviour of previous versions - you can change this toSerialize
to instead generate schemas describing the type's serialization behaviour (#48 / #335)
Changed
- Schemas generated for enums with no variants will now generate
false
(or equivalently{"not":{}}
), instead of{"enum":[]}
. This is so generated schemas no longer violate the JSON Schema spec's recommendation that a schema'senum
array "SHOULD have at least one element".