From 67a3fffad783fdbbedd3a4200786beab2cfeef55 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Wed, 4 Feb 2015 07:21:08 -0800 Subject: [PATCH] added copy function --- .../wordnik/swagger/codegen/DefaultCodegen.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java b/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java index 87cc60b5c7..e89b0f0b26 100644 --- a/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java +++ b/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java @@ -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()); } } }