Skip to content

Commit 3785165

Browse files
authored
fix missing parenthesis for http bearer auth (#2723)
1 parent cff6eaa commit 3785165

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public class ApiClient {
128128
// Setup authentications (key: authentication name, value: authentication).
129129
authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
130130
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}}
131-
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}");{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
131+
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
132132
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}}
133133
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
134134
// Prevent the authentications from being modified.

modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/ApiClient.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class ApiClient {
4242
// Setup authentications (key: authentication name, value: authentication).
4343
authentications = new HashMap<{{#supportJava6}}String, Authentication{{/supportJava6}}>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
4444
// authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}}
45-
// authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}");{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
45+
// authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
4646
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}}
4747
// authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
4848
// Prevent the authentications from being modified.

modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class ApiClient {
8181
// Setup authentications (key: authentication name, value: authentication).
8282
this.authentications = new HashMap<>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
8383
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}}
84-
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}");{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
84+
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
8585
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}}
8686
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}}
8787
// Prevent the authentications from being modified.

0 commit comments

Comments
 (0)