Skip to content

Commit 30cdb79

Browse files
committed
Merge pull request #1845 from swagger-api/wing328-android_reserved_word-travis
Wing328 android reserved word travis
2 parents 2cf122a + bf012f9 commit 30cdb79

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AndroidClientCodegen.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,19 @@ public AndroidClientCodegen() {
4242

4343
reservedWords = new HashSet<String>(
4444
Arrays.asList(
45-
"abstract", "continue", "for", "new", "switch", "assert",
46-
"default", "if", "package", "synchronized", "boolean", "do", "goto", "private",
47-
"this", "break", "double", "implements", "protected", "throw", "byte", "else",
48-
"import", "public", "throws", "case", "enum", "instanceof", "return", "transient",
49-
"catch", "extends", "int", "short", "try", "char", "final", "interface", "static",
50-
"void", "class", "finally", "long", "strictfp", "volatile", "const", "float",
51-
"native", "super", "while")
45+
// local variable names used in API methods (endpoints)
46+
"postBody", "path", "queryParams", "headerParams", "formParams",
47+
"contentTypes", "contentType", "response", "builder", "httpEntity",
48+
"authNames", "basePath", "apiInvoker",
49+
50+
// android reserved words
51+
"abstract", "continue", "for", "new", "switch", "assert",
52+
"default", "if", "package", "synchronized", "boolean", "do", "goto", "private",
53+
"this", "break", "double", "implements", "protected", "throw", "byte", "else",
54+
"import", "public", "throws", "case", "enum", "instanceof", "return", "transient",
55+
"catch", "extends", "int", "short", "try", "char", "final", "interface", "static",
56+
"void", "class", "finally", "long", "strictfp", "volatile", "const", "float",
57+
"native", "super", "while")
5258
);
5359

5460
languageSpecificPrimitives = new HashSet<String>(

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AsyncScalaClientCodegen.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@ public AsyncScalaClientCodegen() {
4747

4848
reservedWords = new HashSet<String>(
4949
Arrays.asList(
50-
"abstract", "case", "catch", "class", "def", "do", "else", "extends",
51-
"false", "final", "finally", "for", "forSome", "if", "implicit",
52-
"import", "lazy", "match", "new", "null", "object", "override", "package",
53-
"private", "protected", "return", "sealed", "super", "this", "throw",
54-
"trait", "try", "true", "type", "val", "var", "while", "with", "yield")
50+
// local variable names used in API methods (endpoints)
51+
"config", "path", "contentTypes", "contentType", "queryParams", "headerParams",
52+
"formParams", "postBody", "resFuture", "client", "reader",
53+
54+
// scala reserved words
55+
"abstract", "case", "catch", "class", "def", "do", "else", "extends",
56+
"false", "final", "finally", "for", "forSome", "if", "implicit",
57+
"import", "lazy", "match", "new", "null", "object", "override", "package",
58+
"private", "protected", "return", "sealed", "super", "this", "throw",
59+
"trait", "try", "true", "type", "val", "var", "while", "with", "yield")
5560
);
5661

5762
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ public ScalaClientCodegen() {
4949

5050
reservedWords = new HashSet<String>(
5151
Arrays.asList(
52-
"abstract", "case", "catch", "class", "def", "do", "else", "extends",
53-
"false", "final", "finally", "for", "forSome", "if", "implicit",
54-
"import", "lazy", "match", "new", "null", "object", "override", "package",
55-
"private", "protected", "return", "sealed", "super", "this", "throw",
56-
"trait", "try", "true", "type", "val", "var", "while", "with", "yield")
52+
// local variable names used in API methods (endpoints)
53+
"path", "contentTypes", "contentType", "queryParams", "headerParams",
54+
"formParams", "postBody", "mp", "basePath", "apiInvoker",
55+
56+
// scala reserved words
57+
"abstract", "case", "catch", "class", "def", "do", "else", "extends",
58+
"false", "final", "finally", "for", "forSome", "if", "implicit",
59+
"import", "lazy", "match", "new", "null", "object", "override", "package",
60+
"private", "protected", "return", "sealed", "super", "this", "throw",
61+
"trait", "try", "true", "type", "val", "var", "while", "with", "yield")
5762
);
5863

5964
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);

0 commit comments

Comments
 (0)