added copy function

This commit is contained in:
Tony Tam 2015-02-04 07:21:08 -08:00
parent 7d0e003bf2
commit 67a3fffad7

View File

@ -661,34 +661,34 @@ public class DefaultCodegen {
CodegenParameter p = fromParameter(param, imports);
allParams.add(p);
if(param instanceof QueryParameter) {
queryParams.add(p);
p.isQueryParam = new Boolean(true);
queryParams.add(p.copy());
}
else if(param instanceof PathParameter) {
p.required = true;
pathParams.add(p);
p.isPathParam = new Boolean(true);
pathParams.add(p.copy());
}
else if(param instanceof HeaderParameter) {
headerParams.add(p);
p.isHeaderParam = new Boolean(true);
headerParams.add(p.copy());
}
else if(param instanceof CookieParameter) {
cookieParams.add(p);
p.isCookieParam = new Boolean(true);
cookieParams.add(p.copy());
}
else if(param instanceof BodyParameter) {
bodyParams.add(p);
p.isBodyParam = new Boolean(true);
bodyParam = p;
bodyParams.add(p.copy());
}
else if(param instanceof FormParameter) {
formParams.add(p);
if("File".equals(p.dataType))
if("file".equals(p.dataType))
p.isFile = true;
else
p.notFile = true;
p.isFormParam = new Boolean(true);
formParams.add(p.copy());
}
}
}