better local variable naming for ruby, python and php

This commit is contained in:
wing328
2016-02-28 11:48:14 +08:00
parent 8a68a64609
commit f68e93c662
17 changed files with 396 additions and 131 deletions

View File

@@ -52,7 +52,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
setReservedWordsLowerCase(
Arrays.asList(
// local variables used in api methods (endpoints)
"resourcePath", "method", "httpBody", "queryParams", "headerParams",
"resourcePath", "httpBody", "queryParams", "headerParams",
"formParams", "_header_accept", "_tempBody",
// PHP reserved words

View File

@@ -60,7 +60,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
Arrays.asList(
// local variable name used in API methods (endpoints)
"all_params", "resource_path", "method", "path_params", "query_params",
"header_params", "form_params", "files", "body_params", "auth_settings",
"header_params", "form_params", "local_var_files", "body_params", "auth_settings",
// python reserved words
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
"assert", "else", "if", "pass", "yield", "break", "except", "import",

View File

@@ -61,7 +61,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
setReservedWordsLowerCase(
Arrays.asList(
// local variable names used in API methods (endpoints)
"path", "query_params", "header_params", "_header_accept", "_header_accept_result",
"local_var_path", "query_params", "header_params", "_header_accept", "_header_accept_result",
"_header_content_type", "form_params", "post_body", "auth_names",
// ruby reserved keywords
"__FILE__", "and", "def", "end", "in", "or", "self", "unless", "__LINE__",