Skip to content

Commit 3f18d0f

Browse files
lchwelschwe
andauthored
Dart - Fix default value of enum variables (#7496)
Co-authored-by: Lucas Chwe <lucas.chwe@gmail.com>
1 parent 54dd185 commit 3f18d0f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/openapi-generator/src/main/resources/dart2/class.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class {{classname}} {
66
{{/isEnum}}
77
{{#isEnum}}
88
{{#allowableValues}}
9-
{{#min}} // range from {{min}} to {{max}}{{/min}}{{classname}}{{{enumName}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}}{{/required}};
9+
{{#min}} // range from {{min}} to {{max}}{{/min}}{{classname}}{{{enumName}}} {{name}}{{#required}} = {{classname}}{{{enumName}}}._internal({{{defaultValue}}}){{/required}}{{^required}}{{/required}};
1010
{{/allowableValues}}
1111
{{/isEnum}}
1212
{{/vars}}

0 commit comments

Comments
 (0)