update objc reserved word list to include local variable name in api

methods
This commit is contained in:
wing328 2016-01-06 23:22:50 +08:00
parent f033f59867
commit 30445633d6
2 changed files with 19 additions and 14 deletions

View File

@ -89,19 +89,24 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
// ref: http://www.tutorialspoint.com/objective_c/objective_c_basic_syntax.htm
reservedWords = new HashSet<String>(
Arrays.asList(
"auto", "else", "long", "switch",
"break", "enum", "register", "typedef",
"case", "extern", "return", "union",
"char", "float", "short", "unsigned",
"const", "for", "signed", "void",
"continue", "goto", "sizeof", "volatile",
"default", "if", "id", "static", "while",
"do", "int", "struct", "_Packed",
"double", "protocol", "interface", "implementation",
"NSObject", "NSInteger", "NSNumber", "CGFloat",
"property", "nonatomic", "retain", "strong",
"weak", "unsafe_unretained", "readwrite", "readonly",
"description"
// local variable names in API methods (endpoints)
"resourcePath", "pathParams", "queryParams", "headerParams",
"responseContentType", "requestContentType", "authSettings",
"formParams", "files", "bodyParam",
// objc reserved words
"auto", "else", "long", "switch",
"break", "enum", "register", "typedef",
"case", "extern", "return", "union",
"char", "float", "short", "unsigned",
"const", "for", "signed", "void",
"continue", "goto", "sizeof", "volatile",
"default", "if", "id", "static", "while",
"do", "int", "struct", "_Packed",
"double", "protocol", "interface", "implementation",
"NSObject", "NSInteger", "NSNumber", "CGFloat",
"property", "nonatomic", "retain", "strong",
"weak", "unsafe_unretained", "readwrite", "readonly",
"description"
));
importMapping = new HashMap<String, String>();

View File

@ -7,8 +7,8 @@
* Do not edit the class manually.
*/
#import "SWGTag.h"
#import "SWGCategory.h"
#import "SWGTag.h"
@protocol SWGPet