@@ -36,12 +36,12 @@ public JavaClientCodegen() {
36
36
37
37
reservedWords = new HashSet <String > (
38
38
Arrays .asList (
39
- "abstract" , "continue" , "for" , "new" , "switch" , "assert" ,
40
- "default" , "if" , "package" , "synchronized" , "boolean" , "do" , "goto" , "private" ,
41
- "this" , "break" , "double" , "implements" , "protected" , "throw" , "byte" , "else" ,
42
- "import" , "public" , "throws" , "case" , "enum" , "instanceof" , "return" , "transient" ,
43
- "catch" , "extends" , "int" , "short" , "try" , "char" , "final" , "interface" , "static" ,
44
- "void" , "class" , "finally" , "long" , "strictfp" , "volatile" , "const" , "float" ,
39
+ "abstract" , "continue" , "for" , "new" , "switch" , "assert" ,
40
+ "default" , "if" , "package" , "synchronized" , "boolean" , "do" , "goto" , "private" ,
41
+ "this" , "break" , "double" , "implements" , "protected" , "throw" , "byte" , "else" ,
42
+ "import" , "public" , "throws" , "case" , "enum" , "instanceof" , "return" , "transient" ,
43
+ "catch" , "extends" , "int" , "short" , "try" , "char" , "final" , "interface" , "static" ,
44
+ "void" , "class" , "finally" , "long" , "strictfp" , "volatile" , "const" , "float" ,
45
45
"native" , "super" , "while" )
46
46
);
47
47
@@ -58,7 +58,7 @@ public JavaClientCodegen() {
58
58
);
59
59
instantiationTypes .put ("array" , "ArrayList" );
60
60
instantiationTypes .put ("map" , "HashMap" );
61
-
61
+
62
62
cliOptions .add (new CliOption ("invokerPackage" , "root package for generated code" ));
63
63
cliOptions .add (new CliOption ("groupId" , "groupId in generated pom.xml" ));
64
64
cliOptions .add (new CliOption ("artifactId" , "artifactId in generated pom.xml" ));
@@ -69,53 +69,55 @@ public JavaClientCodegen() {
69
69
@ Override
70
70
public void processOpts () {
71
71
super .processOpts ();
72
-
72
+
73
73
if (additionalProperties .containsKey ("invokerPackage" )) {
74
74
this .setInvokerPackage ((String )additionalProperties .get ("invokerPackage" ));
75
75
}
76
76
else {
77
77
//not set, use default to be passed to template
78
78
additionalProperties .put ("invokerPackage" , invokerPackage );
79
79
}
80
-
80
+
81
81
if (additionalProperties .containsKey ("groupId" )) {
82
82
this .setGroupId ((String )additionalProperties .get ("groupId" ));
83
83
}
84
84
else {
85
85
//not set, use to be passed to template
86
86
additionalProperties .put ("groupId" , groupId );
87
87
}
88
-
88
+
89
89
if (additionalProperties .containsKey ("artifactId" )) {
90
90
this .setArtifactId ((String )additionalProperties .get ("artifactId" ));
91
91
}
92
92
else {
93
93
//not set, use to be passed to template
94
94
additionalProperties .put ("artifactId" , artifactId );
95
95
}
96
-
96
+
97
97
if (additionalProperties .containsKey ("artifactVersion" )) {
98
98
this .setArtifactVersion ((String )additionalProperties .get ("artifactVersion" ));
99
99
}
100
100
else {
101
101
//not set, use to be passed to template
102
102
additionalProperties .put ("artifactVersion" , artifactVersion );
103
103
}
104
-
104
+
105
105
if (additionalProperties .containsKey ("sourceFolder" )) {
106
106
this .setSourceFolder ((String )additionalProperties .get ("sourceFolder" ));
107
107
}
108
108
109
109
supportingFiles .add (new SupportingFile ("pom.mustache" , "" , "pom.xml" ));
110
- supportingFiles .add (new SupportingFile ("apiInvoker.mustache" ,
111
- (sourceFolder + File .separator + invokerPackage ).replace ("." , java .io .File .separator ), "ApiInvoker.java" ));
112
- supportingFiles .add (new SupportingFile ("JsonUtil.mustache" ,
110
+ supportingFiles .add (new SupportingFile ("ApiClient.mustache" ,
111
+ (sourceFolder + File .separator + invokerPackage ).replace ("." , java .io .File .separator ), "ApiClient.java" ));
112
+ supportingFiles .add (new SupportingFile ("Configuration.mustache" ,
113
+ (sourceFolder + File .separator + invokerPackage ).replace ("." , java .io .File .separator ), "Configuration.java" ));
114
+ supportingFiles .add (new SupportingFile ("JsonUtil.mustache" ,
113
115
(sourceFolder + File .separator + invokerPackage ).replace ("." , java .io .File .separator ), "JsonUtil.java" ));
114
- supportingFiles .add (new SupportingFile ("apiException.mustache" ,
116
+ supportingFiles .add (new SupportingFile ("apiException.mustache" ,
115
117
(sourceFolder + File .separator + invokerPackage ).replace ("." , java .io .File .separator ), "ApiException.java" ));
116
118
}
117
-
118
-
119
+
120
+
119
121
120
122
@ Override
121
123
public String escapeReservedWord (String name ) {
0 commit comments