Skip to content

Commit 300a0dc

Browse files
committed
Update retrofit library for changes to OAuth scope handling
1 parent 6cc17d8 commit 300a0dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/ApiClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class ApiClient {
5454
if (authName == "{{name}}") { {{#isBasic}}
5555
auth = new HttpBasicAuth();{{/isBasic}}{{#isApiKey}}
5656
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}");{{/isApiKey}}{{#isOAuth}}
57-
auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{^-first}}, {{/-first}}{{this}}{{/scopes}}");{{/isOAuth}}
57+
auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}");{{/isOAuth}}
5858
} else {{/authMethods}}{
5959
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
6060
}

0 commit comments

Comments
 (0)