model_generator 6.2.1
model_generator: ^6.2.1 copied to clipboard
Dart tool to automaticly generate models from a yml file to speed up your development flow.
Changelog #
[6.2.1] - 2023-03-07 #
- Updated the enum model generator to correctly generate the (reverse)Mapping based on the item_type
[6.2.0] - 2023-02-23 #
- Better enum support. Right now, String, int, double can be used to map a value to an enum.
[6.1.0] - 2022-10-14 #
- Support passing a directory instead of a file. All .yaml files inside this folder (recursively) will be used to build the final model data.
[6.0.2] - 2022-10-06 #
- Updated travis to use linux instead of macOS
[6.0.1] - 2022-10-05 #
- Don't create dart:core imports for custom objects
[6.0.0] - 2022-10-04 #
- 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
[5.9.0] - 2022-03-29 #
- 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
[5.8.1] - 2021-12-09 #
- Detect the current min dart version and use newer features when available. (Fixes #108)
[5.8.0] - 2021-11-25 #
- Added
retrofit_compute
option to generate top-level functions compatible with retrofit's compute mode. (Fixes #106)
[5.7.1] - 2021-11-13 #
- Fixed issue where default values would still throw missing key exceptions. (Fixes #103)
[5.7.0] - 2021-11-02 #
- Added better support for import sorting. This way the analyzer won't break each time you build. (Fixes #101)
[5.6.0] - 2021-10-22 #
- Support default values for properties. (Fixes #54)
[5.5.0] - 2021-10-17 #
- Allow configuration that ignores certain fields for equals and hashCode generation. (Fixes #99)
[5.4.0] - 2021-10-16 #
- Allow configuration that stops the automatic uppercasing of enums. (Fixes #97)
[5.3.1] - 2021-09-19 #
- Fixed bug that caused the generation loop to prematurely exit when it encountered a custom or json converter model
[5.3.0] - 2021-09-14 #
- Ensure the import directives are sorted (new lint rules)
- Ensure dynamic fields are not marked nullable (new lint rules)
[5.2.0] - 2021-09-07 #
- fromJson & toJson custom override
[5.1.1] - 2021-08-27 #
- Add support for adding
description
on fields to generate documentation entries - Fix self references (#82)
[5.0.0] - 2021-07-27 #
[4.3.2] - 2021-05-06 #
[4.3.0] - 2021-04-20 #
Added #
- Added support for adding extra annotations and imports
- Added support for generating == and hashCode
- Added support for generating toString
[4.0.0] - 2021-02-09 #
Added #
- 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
[3.3.0] - 2020-10-24 #
[3.2.0] - 2020-10-14 #
Added #
- Parameter and command line to specify your own config.yaml (#16 Thanks to NicolaChimerapps)
[3.1.0] - 2020-10-13 #
Added #
- Added support for importing other dart packages when using path (Thanks to NicolaChimerapps)
- Added support for json_converter (#43 Thanks to NicolaChimerapps)
[3.0.0] - 2020-10-06 #
Breaking Change #
- renamed includeIfNull to include_if_nul to keep a consistent api
Added #
- Added unknown_enum_value support (#44 Thanks to DimmyMaenhout)
- Added non_final support (#34 Thanks to NicolaChimerapps)
[2.2.0] - 2020-10-04 #
Added #
- 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)
Fixed #
- The removed .g.dart files (Thanks to JeremiFerre)
Updated #
- Documentation updated
- Dependencies updated
- License
[2.1.0] - 2020-07-24 #
Added #
- #26 supprot for custom objects
- #28 support for custom fromJson & toJson objects
[2.0.0] - 2020-06-11 #
[1.6.0] - 2020-06-11 #
Added #
- Custom jsonKey support (Thanks to NicolaChimerapps)
[1.5.0] - 2020-05-19 #
Fixed #
- Major bug when you did not specify object. (object is the default now)
[1.4.0] - 2020-05-18 #
Added #
- #19 Enum support you can now use add enums (with values) to your config.yaml
[1.2.0] - 2020-04-22 #
Fixed #
- #13 @JsonKey( ignore: true) should be a variable instead of a final field