Carapacik / swagger_parser

Dart package that takes an OpenApi definition file and generates REST clients based on retrofit and data classes for your project.
https://pub.dev/packages/swagger_parser
MIT License
87 stars 33 forks source link

includeIfNull for @JsonSerializable in the configuration #241

Open AntonShynkaretskyi opened 2 weeks ago

AntonShynkaretskyi commented 2 weeks ago

Use case

By default all the models are generated without includeIfNull value.

Solutions considered

I haven't found any existing configuration for it. Json also doesn't seems to be supporting any kind of global config for it.

Proposal

It'd be awesome to be able to generate @JsonSerializable(includeIfNull: false) instead of @JsonSerializable() when necessary.