Merge branch 'develop_2.0' of github.com:swagger-api/swagger-codegen into develop_2.0

This commit is contained in:
Tony Tam
2015-03-19 09:04:16 -07:00
21 changed files with 115 additions and 52 deletions

View File

@@ -556,14 +556,18 @@ public class DefaultCodegen {
property.isPrimitiveType = true;
}
else {
property.isNotContainer = true;
setNonArrayMapProperty(property, type);
}
return property;
}
protected void setNonArrayMapProperty(CodegenProperty property, String type) {
property.isNotContainer = true;
if(languageSpecificPrimitives().contains(type))
property.isPrimitiveType = true;
else
property.complexType = property.baseType;
}
return property;
}
private Response findMethodResponse(Map<String, Response> responses) {

View File

@@ -168,7 +168,18 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
}
}
@Override
@Override
protected void setNonArrayMapProperty(CodegenProperty property, String type) {
super.setNonArrayMapProperty(property, type);
if("NSDictionary".equals(type)) {
property.setter = "initWithDictionary";
}
else {
property.setter = "initWithValues";
}
}
@Override
public String toModelImport(String name) {
if("".equals(modelPackage()))
return name;