From 1adc962f2b45f51ad3d0faa9068728155aa255e8 Mon Sep 17 00:00:00 2001 From: davidwcarlson <516753+davidwcarlson@users.noreply.github.com> Date: Sat, 23 Mar 2019 03:38:00 -0700 Subject: [PATCH] java-jersey2 - Always render setBearerToken regardless of whether OAuth2 is in use. (#2479) --- .../main/resources/Java/libraries/jersey2/ApiClient.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index 2de4af24edc..9b19457b04c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -194,7 +194,6 @@ public class ApiClient { throw new RuntimeException("No API key authentication configured!"); } - {{#hasOAuthMethods}} /** * Helper method to set bearer token for the first Bearer authentication. * @param bearerToken Bearer token @@ -209,6 +208,7 @@ public class ApiClient { throw new RuntimeException("No Bearer authentication configured!"); } + {{#hasOAuthMethods}} /** * Helper method to set access token for the first OAuth2 authentication. * @param accessToken Access token