Merge pull request #2266 from wing328/php_better_local_var

[Ruby][Python][PHP] better local variable naming for ruby, python and php
This commit is contained in:
wing328
2016-02-28 18:23:11 +08:00
17 changed files with 418 additions and 201 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

@@ -59,8 +59,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
setReservedWordsLowerCase(
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",
"all_params", "resource_path", "path_params", "query_params",
"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__",