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}} {
|
||||
{{#allowableValues}}{{#enumVars}}{{name}}("{{value}}"){{^-last}},
|
||||
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||
@ -9,6 +10,7 @@ public enum {{datatypeWithEnum}} {
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String toString() {
|
||||
return value;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.io.Serializable;{{/serializableModel}}
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
{{#models}}
|
||||
|
||||
{{#model}}{{#description}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user