Bug Report Checklist
Description
For a schema that has an Enum property with a "default" value, the generated result has compile errors. This does not happen with string properties that have default values.
Minimal api.json:
https://gist.github.com/mrohlof-protofy/f35cab420710d1ce696c28a584285099
Call:
openapi-generator generate -g dart-dio -i api.json -o ./
dart run build_runner build --delete-conflicting-outputs
Result:
...
27 | static void _defaults(MyActionBuilder b) => b
28 | ..executionMode = const ._(ExecutionMode.INSTANT);
...
Issue:
my_action.dart:28:31: Expected an identifier.
Expected Result:
...
27 | static void _defaults(MyActionBuilder b) => b
28 | ..executionMode = ExecutionMode.INSTANT;
...
openapi-generator version
7.10.0
OpenAPI declaration file content or url
Minimal example:
https://gist.github.com/mrohlof-protofy/f35cab420710d1ce696c28a584285099
Generation Details
Steps to reproduce
openapi-generator generate -g dart-dio -i api.json -o ./
dart run build_runner build --delete-conflicting-outputs
Related issues/PRs
Suggest a fix
Defaults
Bug Report Checklist
Description
For a schema that has an Enum property with a "default" value, the generated result has compile errors. This does not happen with string properties that have default values.
Minimal api.json:
https://gist.github.com/mrohlof-protofy/f35cab420710d1ce696c28a584285099
Call:
Result:
Issue:
Expected Result:
openapi-generator version
7.10.0
OpenAPI declaration file content or url
Minimal example:
https://gist.github.com/mrohlof-protofy/f35cab420710d1ce696c28a584285099
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
Defaults