From fad23df09c1270abd6464bcfc5a0dfb2be4c96fc Mon Sep 17 00:00:00 2001 From: Tiffany Marrel Date: Sat, 3 Jun 2023 05:45:55 +0200 Subject: [PATCH] [Rust] fix security features listed in documentation (#15718) --- docs/generators/rust.md | 2 +- .../org/openapitools/codegen/languages/RustClientCodegen.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/generators/rust.md b/docs/generators/rust.md index aa6fcd2bba35..e37ca69dc3b3 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -223,7 +223,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/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index fd7c018a1db8..896d466950f8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -91,6 +91,7 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) .securityFeatures(EnumSet.of( SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, SecurityFeature.ApiKey, SecurityFeature.OAuth2_Implicit ))