diff --git a/docs/generators/r.md b/docs/generators/r.md index d5bf0df1a2f..2665c5fc0b1 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -180,7 +180,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 |OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 +|BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✗|OAS2,OAS3 |OAuth2_ClientCredentials|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 24669ea6db1..fea410e1072 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -102,7 +102,8 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { .securityFeatures(EnumSet.of( SecurityFeature.BasicAuth, SecurityFeature.ApiKey, - SecurityFeature.OAuth2_Implicit + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken )) .excludeGlobalFeatures( GlobalFeature.XMLStructureDefinitions,