Correct description of collections of object and nested

This commit is contained in:
Shelby Sanders 2014-07-10 05:07:43 -07:00
parent 88c330a503
commit a9c1152c74
1 changed files with 6 additions and 2 deletions

View File

@ -395,7 +395,7 @@
this.refDataType = obj.items.$ref; this.refDataType = obj.items.$ref;
} }
} }
this.dataTypeWithRef = this.refDataType != null ? this.dataType + '[' + this.refDataType + ']' : this.dataType; this.dataTypeWithRef = this.refDataType != null ? (this.dataType[0].toUpperCase() + this.dataType.substring(1, this.dataType.length) + ' of ' + this.refDataType) : this.dataType;
if (obj.allowableValues != null) { if (obj.allowableValues != null) {
this.valueType = obj.allowableValues.valueType; this.valueType = obj.allowableValues.valueType;
this.values = obj.allowableValues.values; this.values = obj.allowableValues.values;
@ -537,7 +537,11 @@
listType = this.isListType(dataType); listType = this.isListType(dataType);
isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true; isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true;
if (isPrimitive) { if (isPrimitive) {
return dataType; if (listType != null) {
return '<span class="strong">Array of </span>' + listType;
} else {
return dataType;
}
} else { } else {
if (listType != null) { if (listType != null) {
return '<span class="strong">Array of </span>' + models[listType].getMockSignature(); return '<span class="strong">Array of </span>' + models[listType].getMockSignature();