Skip to content

Commit 896d0d4

Browse files
committed
[#61769706] Fixes a bug where the wrong name was being used for header
parameters in the Android code generator.
1 parent cf95d4e commit 896d0d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/resources/android-java/api.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public class {{classname}} {
1919
public ApiInvoker getInvoker() {
2020
return apiInvoker;
2121
}
22-
22+
2323
public void setBasePath(String basePath) {
2424
this.basePath = basePath;
2525
}
26-
26+
2727
public String getBasePath() {
2828
return basePath;
2929
}
@@ -45,10 +45,10 @@ public class {{classname}} {
4545
Map<String, String> headerParams = new HashMap<String, String>();
4646

4747
{{#queryParams}}if(!"null".equals(String.valueOf({{paramName}})))
48-
queryParams.put("{{paramName}}", String.valueOf({{paramName}}));
48+
queryParams.put("{{baseName}}", String.valueOf({{paramName}}));
4949
{{/queryParams}}
5050

51-
{{#headerParams}}headerParams.put("{{paramName}}", {{paramName}});
51+
{{#headerParams}}headerParams.put("{{baseName}}", {{paramName}});
5252
{{/headerParams}}
5353

5454
String contentType = "application/json";
@@ -72,4 +72,4 @@ public class {{classname}} {
7272
}
7373
{{/operation}}
7474
}
75-
{{/operations}}
75+
{{/operations}}

0 commit comments

Comments
 (0)