Skip to content

Commit be76d3a

Browse files
committedApr 2, 2025
modify enum template. field should be final. add testcase & sample updates.
1 parent c4a6c4a commit be76d3a

File tree

248 files changed

+392
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+392
-344
lines changed
 

‎modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{{/allowableValues}}
3131
{{/gson}}
3232

33-
private {{{dataType}}} value;
33+
private final {{{dataType}}} value;
3434

3535
{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) {
3636
this.value = value;

‎modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatyp
3131
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
3232
{{/gson}}
3333

34-
private {{{dataType}}} value;
34+
private final {{{dataType}}} value;
3535

3636
{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
3737
this.value = value;

0 commit comments

Comments
 (0)