forked from loafle/openapi-generator-original
more enum support
This commit is contained in:
@@ -9,7 +9,7 @@ import java.util.Set;
|
||||
|
||||
public class CodegenModel {
|
||||
public String parent;
|
||||
public String name, classname, description, classVarName, modelJson;
|
||||
public String name, classname, description, classVarName, modelJson, dataType;
|
||||
public String unescapedDescription;
|
||||
public String defaultValue;
|
||||
public List<CodegenProperty> vars = new ArrayList<CodegenProperty>();
|
||||
|
||||
@@ -841,6 +841,8 @@ public class DefaultCodegen {
|
||||
if(impl.getEnum() != null && impl.getEnum().size() > 0) {
|
||||
m.isEnum = true;
|
||||
m.allowableValues = impl.getEnum();
|
||||
Property p = PropertyBuilder.build(impl.getType(), impl.getFormat(), null);
|
||||
m.dataType = getSwaggerType(p);
|
||||
}
|
||||
if (impl.getAdditionalProperties() != null) {
|
||||
MapProperty mapProperty = new MapProperty(impl.getAdditionalProperties());
|
||||
|
||||
Reference in New Issue
Block a user