- BREAKING CHANGE: Every type is now defined inline, this means that 'required' is no longer supported, if a field isn't nullable it is automatically required. This also means that the 'array' type is no longer supported and is instead just defined like 'List'.
- BREAKING CHANGE: The way enums are defined has changed, see readme for more information. You can now add properties to enums, optional and default values are supported.
- BREAKING CHANGE: Enums are now by default not uppercase anymore, you can still enable this my adding 'uppercase_enums: true' to your pubspec or enum configuration
- Logs of build runner now get shown in real time.
- You are now allowed to have no properties configured for a class.
- Fixed the deprecated
ignore
field. Added
includeFromJson: false
includeToJson: false
- Updated the enum model generator to correctly generate the (reverse)Mapping based on the item_type
- Better enum support. Right now, String, int, double can be used to map a value to an enum.
- Support passing a directory instead of a file. All .yaml files inside this folder (recursively) will be used to build the final model data.
- Updated travis to use linux instead of macOS
- Don't create dart:core imports for custom objects
- Added the ability to specify simple fields in a more compact way, inline.
Example: id and id2, name and name2 are equivalent notations
ExampleModel:
properties:
id: string
id2:
type: string
required: true
name: string?
name2:
type: string
required: false
- POTENTIALLY BREAKING CHANGE: By default, fields with a default value will now accept 'null' to use their default value
- Add options to control whether fields with default value accepts 'null' or not
disallow_null
on fieldsdisallow_null_for_defaults
on the root yml config or the object config
- Detect the current min dart version and use newer features when available. (Fixes #108)
- Added
retrofit_compute
option to generate top-level functions compatible with retrofit's compute mode. (Fixes #106)
- Fixed issue where default values would still throw missing key exceptions. (Fixes #103)
- Added better support for import sorting. This way the analyzer won't break each time you build. (Fixes #101)
- Support default values for properties. (Fixes #54)
- Allow configuration that ignores certain fields for equals and hashCode generation. (Fixes #99)
- Allow configuration that stops the automatic uppercasing of enums. (Fixes #97)
- Fixed bug that caused the generation loop to prematurely exit when it encountered a custom or json converter model
- Ensure the import directives are sorted (new lint rules)
- Ensure dynamic fields are not marked nullable (new lint rules)
- fromJson & toJson custom override
- Add support for adding
description
on fields to generate documentation entries - Fix self references (#82)
- include_if_null changed the default value to false
- explicit_to_json at global level (default is true)
- explicit_to_json at model level (default is true)
- Added support for generating a mapping for enum's:
generate_map: true
- Added support for generating extension methods using the enum's mapping:
generate_extensions: true
- Custom models will not generate a new file
- Added support for adding extra annotations and imports
- Added support for generating == and hashCode
- Added support for generating toString
- Support Map support
- Support for generatic generics fromJsonT()
- Support for generating models with nullsafety support to support Flutter 2.0 & dart 2.12 ###Removed
- nullsafe flag is removed because from this version we are targeting 2.12 which will use nullsafety by default
- 100% test coverage
- Better error logging
- boolean list support
- Travis scripts
- Flutter Android Example project to use v2 embedding
- SDK constraints ">=2.2.0 <3.0.0"
- Fvm was not always detected correctly
- Some bugs
- dynamic list support
- Parameter and command line to specify your own config.yaml (#16 Thanks to NicolaChimerapps)
- Added support for importing other dart packages when using path (Thanks to NicolaChimerapps)
- Added support for json_converter (#43 Thanks to NicolaChimerapps)
- renamed includeIfNull to include_if_nul to keep a consistent api
- Added unknown_enum_value support (#44 Thanks to DimmyMaenhout)
- Added non_final support (#34 Thanks to NicolaChimerapps)
- FVM support
- Travis CI support (badge)
- Coveralls test coverage support (badge) (no test yet issue #38)
- MIT license (badge)
- Support for custom base_directory (Thanks to JeremiFerre)
- Support for dynamic dart type (Thanks to JeremiFerre)
- Support for includeIfNull annotation property (Thanks to DimmyMaenhout)
- The removed .g.dart files (Thanks to JeremiFerre)
- Documentation updated
- Dependencies updated
- License
- Formatting
- Analyzer
- #26 supprot for custom objects
- #28 support for custom fromJson & toJson objects
- Change snake case to camelCase (Thanks to NicolaChimerapps)
- Custom jsonKey support (Thanks to NicolaChimerapps)
- Major bug when you did not specify object. (object is the default now)
- Formatting
- #19 Enum support you can now use add enums (with values) to your config.yaml
- #17 path ending with a / would crash your app
- #13 @JsonKey( ignore: true) should be a variable instead of a final field
- #11 option to ignore a field in the json serialization
- #6 yield is not supported. (keywords are changed to
yieldValue
the jsonName will still beyield
) - #7 fixed readme
- #8 _ should be removed
- Some extra bugs and a more standard form is used.
- Fixed import for @required
- Named params to the models
- Nullable fields added
- Crash when using keywords
- Custom Path
- Bugfixing for unknown types
- DateTime supported
- number supported
-Initial release