Java: Support List of Enums in postProcessModels

This commit is contained in:
Madhukar Devaraju
2015-09-11 14:56:37 -07:00
parent 46f78f2180
commit 35f462f571

View File

@@ -349,6 +349,12 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
CodegenModel cm = (CodegenModel) mo.get("model");
for (CodegenProperty var : cm.vars) {
Map<String, Object> allowableValues = var.allowableValues;
// handle ArrayProperty
if(var.items != null) {
allowableValues = var.items.allowableValues;
}
if (allowableValues == null)
continue;
List<String> values = (List<String>) allowableValues.get("values");