Fix a compile error that can occur when deriving `JsonSchema` from a project that doesn't reference serde_json
1.9 KiB
1.9 KiB
Changelog
[0.6.1] - 2019-12-09
Fixed:
- Fix a compile error that can occur when deriving
JsonSchemafrom a project that doesn't reference serde_json
[0.6.0] - 2019-12-09
Added:
- When deriving
JsonSchema, the schema'stitleanddescriptionare now set from#[doc]comments (https://github.com/GREsau/schemars/issues/7) - When deriving
JsonSchemaon structs using a#[serde(default)]attribute, the schema's properties will now includedefault, unless the default value is skipped by the field'sskip_serializing_iffunction (https://github.com/GREsau/schemars/issues/6)
Changed:
- When the
option_nullablesetting is enabled (e.g. for openapi 3), schemas forOption<T>will no longer inlineT's schema when it should be referenceable.
[0.5.1] - 2019-10-30
Fixed:
- Added missing doc comment for
titleschema property
[0.5.0] - 2019-10-30
Added:
- Implemented
JsonSchemafor more standard library types (https://github.com/GREsau/schemars/issues/3)
Changed:
- Unsigned integer types (usize, u8 etc.) now have their
minimumexplicitly set to zero - Made prepositions/conjunctions in generated schema names lowercase
- e.g. schema name for
Result<MyStruct, Vec<String>>has changed from "Result_Of_MyStruct_Or_Array_Of_String" to "Result_of_MyStruct_or_Array_of_String"
- e.g. schema name for
- Some provided
JsonSchemaimplementations with the sametypebut differentformats (e.g.i8andusize) used thetypeas their name. They have now been updated to useformatas their name.- Previously, schema generation would incorrectly assume types such as
MyStruct<i8>andMyStruct<usize>were identical, and give them a single schema definition calledMyStruct_for_Integerdespite the fact they should have different schemas. Now they will each have their own schema (MyStruct_for_i8andMyStruct_for_usizerespectively).
- Previously, schema generation would incorrectly assume types such as