Swagr Codegen: Updates to generate comments properly for models

This commit is contained in:
Deepak Michael
2011-07-27 10:20:59 +05:30
parent 1f738486ee
commit b61d3b2914
3 changed files with 32 additions and 25 deletions

View File

@@ -96,8 +96,10 @@ public class ModelField {
public String getAllowedValuesString() {
String result = "";
for(String allowedValue: this.allowableValues){
result += (allowedValue +",");
if (this.allowableValues != null) {
for(String allowedValue: this.allowableValues){
result += (allowedValue +",");
}
}
if(result.length() == 0)
return null;