forked from loafle/openapi-generator-original
Honor Enum's value
This commit is contained in:
parent
bf19d99e5e
commit
dfda666806
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
public enum {{datatypeWithEnum}} {
|
public enum {{datatypeWithEnum}} {
|
||||||
{{#allowableValues}}{{#enumVars}}{{name}}("{{value}}"){{^-last}},
|
{{#allowableValues}}{{#enumVars}}{{name}}("{{value}}"){{^-last}},
|
||||||
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
|
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||||
@ -9,6 +10,7 @@ public enum {{datatypeWithEnum}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@JsonValue
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import java.io.Serializable;{{/serializableModel}}
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
{{#models}}
|
{{#models}}
|
||||||
|
|
||||||
{{#model}}{{#description}}
|
{{#model}}{{#description}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user