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