Skip to content

Commit 7b8b741

Browse files
committed
fixed outer enum errors for jaxrs-resteasy generator
1 parent fd3513c commit 7b8b741

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1-
public enum {{classname}} {
2-
{{#allowableValues}}{{.}}{{^@last}}, {{/@last}}{{/allowableValues}}
1+
/** o.O
2+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
3+
*/
4+
public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {
5+
{{#allowableValues}}
6+
{{#enumVars}}
7+
{{{name}}}({{#value}}{{{value}}}{{/value}}{{^value}}null{{/value}}){{^@last}},
8+
{{/@last}}{{#@last}};
9+
{{/@last}}
10+
{{/enumVars}}
11+
{{/allowableValues}}
12+
private {{dataType}} value;
13+
14+
{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) {
15+
this.value = value;
16+
}
17+
18+
@Override
19+
@JsonValue
20+
public String toString() {
21+
return String.valueOf(value);
22+
}
323
}

0 commit comments

Comments
 (0)