Fix for finding models needed by methods: ignoring valueTypeInternal.

This commit is contained in:
Colin Pollock 2012-02-29 13:14:29 -08:00
parent 8307aca59d
commit f2b09faf66

View File

@ -131,24 +131,13 @@ public class Endpoint {
if (modelField.getParamType().equalsIgnoreCase(EndpointOperation.PARAM_TYPE_BODY) ){
isParamSetAvailable = false;
for(Model model : resource.getModels()){
if(modelField.getValueTypeInternal() != null) {
if(dataTypeMapper.isPrimitiveType(modelField.getValueTypeInternal())){
isParamSetAvailable = true;
break;
}
if(modelField.getValueTypeInternal().endsWith(model.getName())){
isParamSetAvailable = true;
break;
}
}else{
if(dataTypeMapper.isPrimitiveType(modelField.getDataType())){
isParamSetAvailable = true;
break;
}
if(model.getName().equalsIgnoreCase(modelField.getDataType())){
isParamSetAvailable = true;
break;
}
if(dataTypeMapper.isPrimitiveType(modelField.getDataType())){
isParamSetAvailable = true;
break;
}
if(model.getName().equalsIgnoreCase(modelField.getDataType())){
isParamSetAvailable = true;
break;
}
}
if(!isParamSetAvailable){