Files
openapi-generator-original/modules
Eirik Brandtzæg fbb99d2d15 Add support for Optional<T> in Dart generator (both dart and dart-dio) to distinguish absent, null, and present states (#22257)
* Add support for `Optional<T>` in Dart generator (both dart and dart-dio) to distinguish absent, null, and present states

* Add useOptional and patchOnly options to the Dart client configurations thing for testing (setting both options to "true" for both types)

* Add documentation for useOptional and patchOnly options

* Tune the dart mustache (pluss class mustache) to get rid of the extra whitespace

* More tuning of the dart mustache files to adjust amount of whitespace - match previously generated setup

* Tune dart mustache templates to fix whitespace stuff by tips from wing328

* Fix the logic gap where useOptional=true without patchOnly=true appears to do nothing

* Rename getString() to extractModelNameFromBodyParam()

* Add behavioral tests

  * useOptional flag wrapping non-required properties
  * patchOnly mode PATCH schema detection
  * patchOnly=true auto-enabling useOptional
  * Parameter unwrapping behavior

* Fix inconsistency (my own) in native_class.mustache

* Remove "dead code" (because of timing). postProcessModels has already executed before postProcessOperationsWithModels.

And then we don't even need the extractModelNameFromBodyParam method...

* Fix Optional<T> to properly distinguish between absend and null

Had issues in dio

* Regenerate Dart samples

* Fix extra blank lines in dart-dio json_serializable template output
2026-02-26 22:16:59 +08:00
..