}
for (MustacheItem item : dataType.getItems()) {
String name = item.getName();
ApiModelProperty a = null;
Field f = null;
try {
f = aClass.getDeclaredField(name);
a = f.getAnnotation(ApiModelProperty.class);
if (a == null) {
a = getApiProperty(aClass, name);
}
} catch (NoSuchFieldException e) {
a = getApiProperty(aClass, name);
}
if (a == null) {
return;
}
String type = a.dataType();
if (type.equals("")) {
// need to get true data type
type = getActualDataType(aClass, name);
}
assertEquals(aClass.toString() + " type", type, item.getType());
assertEquals(aClass.toString() + " required", a.required(), item.isRequired());
assertEquals(aClass.toString() + " value", a.value(), nullToEmpty(item.getDescription()));
assertEquals(aClass.toString() + " allowableValues", stringToList(a.allowableValues(), ","), stringToList(item.getAllowableValue(), ","));
}
}