Set the ensureUniqueParams option to true by default

This commit is contained in:
xhh 2015-11-04 21:28:52 +08:00
parent e9ba5ed57c
commit 5a7bb600d6
4 changed files with 2 additions and 4 deletions

View File

@ -41,7 +41,7 @@ public class CodegenConstants {
public static final String SORT_PARAMS_BY_REQUIRED_FLAG_DESC = "Sort method arguments to place required parameters before optional parameters. Default: true";
public static final String ENSURE_UNIQUE_PARAMS = "ensureUniqueParams";
public static final String ENSURE_UNIQUE_PARAMS_DESC = "Whether to ensure parameter names are unique in an operation (rename parameters that are not). Default: false";
public static final String ENSURE_UNIQUE_PARAMS_DESC = "Whether to ensure parameter names are unique in an operation (rename parameters that are not). Default: true";
public static final String PACKAGE_NAME = "packageName";
public static final String PACKAGE_VERSION = "packageVersion";

View File

@ -87,7 +87,7 @@ public class DefaultCodegen {
protected Map<String, String> supportedLibraries = new LinkedHashMap<String, String>();
protected String library = null;
protected Boolean sortParamsByRequiredFlag = true;
protected Boolean ensureUniqueParams = false;
protected Boolean ensureUniqueParams = true;
public List<CliOption> cliOptions() {
return cliOptions;

View File

@ -56,7 +56,6 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
embeddedTemplateDir = templateDir = "Java";
apiPackage = "io.swagger.client.api";
modelPackage = "io.swagger.client.model";
ensureUniqueParams = true;
reservedWords = new HashSet<String>(
Arrays.asList(

View File

@ -34,7 +34,6 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
modelTemplateFiles.put("model.mustache", ".rb");
apiTemplateFiles.put("api.mustache", ".rb");
embeddedTemplateDir = templateDir = "ruby";
ensureUniqueParams = true;
typeMapping.clear();
languageSpecificPrimitives.clear();