diff --git a/docs/generators/apex.md b/docs/generators/apex.md index eb1d5d6902..8b7f34f8ed 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -290,7 +290,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md index b7a57567fc..5d2ece4ff6 100644 --- a/docs/generators/cpp-tiny.md +++ b/docs/generators/cpp-tiny.md @@ -247,7 +247,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index cd1dd1b9ce..c835f2cf3d 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -258,7 +258,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index 901e627731..a301803012 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -305,7 +305,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/javascript-apollo-deprecated.md b/docs/generators/javascript-apollo-deprecated.md index 8b72e8e0f7..18f9b137f3 100644 --- a/docs/generators/javascript-apollo-deprecated.md +++ b/docs/generators/javascript-apollo-deprecated.md @@ -258,7 +258,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index dc802edfad..cc15021d33 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -204,7 +204,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index c1ffe5436c..2867335ab7 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -259,7 +259,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/jetbrains-http-client.md b/docs/generators/jetbrains-http-client.md index 7eedb2131b..83dee15fda 100644 --- a/docs/generators/jetbrains-http-client.md +++ b/docs/generators/jetbrains-http-client.md @@ -151,7 +151,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/julia-client.md b/docs/generators/julia-client.md index 4d4af02647..f855255908 100644 --- a/docs/generators/julia-client.md +++ b/docs/generators/julia-client.md @@ -203,7 +203,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✗|OAS2,OAS3 |OAuth2_Password|✗|OAS2,OAS3 diff --git a/docs/generators/julia-server.md b/docs/generators/julia-server.md index a82363615e..36475230ed 100644 --- a/docs/generators/julia-server.md +++ b/docs/generators/julia-server.md @@ -202,7 +202,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✗|OAS2,OAS3 |OAuth2_Password|✗|OAS2,OAS3 diff --git a/docs/generators/k6.md b/docs/generators/k6.md index 82b450dcdb..7bbab400a0 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -151,7 +151,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 830f28e8d4..8a6b8e3d37 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -168,7 +168,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/n4js.md b/docs/generators/n4js.md index e53e6a89dd..1d5f6e1200 100644 --- a/docs/generators/n4js.md +++ b/docs/generators/n4js.md @@ -228,7 +228,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index cdaeb7a8a9..9832c19d0f 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -150,7 +150,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/postman-collection.md b/docs/generators/postman-collection.md index f15bc8ec58..7c4afee83c 100644 --- a/docs/generators/postman-collection.md +++ b/docs/generators/postman-collection.md @@ -150,7 +150,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/postman.md b/docs/generators/postman.md index 2502469bcd..7127a1ab05 100644 --- a/docs/generators/postman.md +++ b/docs/generators/postman.md @@ -156,6 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |OAuth2_Password|✓|OAS2,OAS3 |OAuth2_ClientCredentials|✓|OAS2,OAS3 |OAuth2_AuthorizationCode|✓|OAS2,OAS3 +|SignatureAuth|✗|OAS3 ### Wire Format Feature | Name | Supported | Defined By | diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 8d901b6da4..a5e4db2c1f 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -338,7 +338,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index a657bc3d30..1b40ef9bf9 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -156,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/docs/generators/xojo-client.md b/docs/generators/xojo-client.md index 025ef8125c..08ebe25376 100644 --- a/docs/generators/xojo-client.md +++ b/docs/generators/xojo-client.md @@ -281,7 +281,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |BasicAuth|✓|OAS2,OAS3 |ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✓|OAS3 +|OpenIDConnect|✗|OAS3 |BearerToken|✓|OAS3 |OAuth2_Implicit|✓|OAS2,OAS3 |OAuth2_Password|✓|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e54b0692e4..60935525b6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -128,8 +128,8 @@ public class DefaultCodegen implements CodegenConfig { .includeSecurityFeatures( SecurityFeature.BasicAuth, SecurityFeature.ApiKey, SecurityFeature.BearerToken, SecurityFeature.OAuth2_Implicit, SecurityFeature.OAuth2_Password, - SecurityFeature.OAuth2_ClientCredentials, SecurityFeature.OAuth2_AuthorizationCode, - SecurityFeature.OpenIDConnect + SecurityFeature.OAuth2_ClientCredentials, SecurityFeature.OAuth2_AuthorizationCode + // OpenIdConnect and SignatureAuth are not yet 100% supported ) .includeWireFormatFeatures( WireFormatFeature.JSON, WireFormatFeature.XML diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java index 822539153a..42a5b58b62 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java @@ -76,10 +76,10 @@ public abstract class AbstractJuliaCodegen extends DefaultCodegen { .excludeWireFormatFeatures( WireFormatFeature.XML ) - .excludeSecurityFeatures( - SecurityFeature.OAuth2_Implicit, SecurityFeature.OAuth2_Password, - SecurityFeature.OAuth2_ClientCredentials, SecurityFeature.OAuth2_AuthorizationCode - ) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.BearerToken)) .excludeParameterFeatures( ParameterFeature.Cookie ) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index 597e94fd51..0e8ec1d920 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashSet; import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; @@ -67,14 +68,9 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi .excludeWireFormatFeatures( WireFormatFeature.PROTOBUF ) - .excludeSecurityFeatures( - SecurityFeature.OpenIDConnect, - SecurityFeature.OAuth2_Password, - SecurityFeature.OAuth2_AuthorizationCode, - SecurityFeature.OAuth2_ClientCredentials, - SecurityFeature.OAuth2_Implicit, - SecurityFeature.BearerToken - ) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey)) .excludeGlobalFeatures( GlobalFeature.XMLStructureDefinitions, GlobalFeature.Callbacks, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index c0cf69884b..93e8406e49 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.net.URL; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Locale; import java.util.Map; @@ -100,18 +101,11 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) .excludeWireFormatFeatures(WireFormatFeature.PROTOBUF) - .includeSecurityFeatures( + .securityFeatures(EnumSet.of( SecurityFeature.ApiKey, SecurityFeature.BasicAuth, SecurityFeature.BearerToken - ) - .excludeSecurityFeatures( - SecurityFeature.OpenIDConnect, - SecurityFeature.OAuth2_Password, - SecurityFeature.OAuth2_AuthorizationCode, - SecurityFeature.OAuth2_ClientCredentials, - SecurityFeature.OAuth2_Implicit - ) + )) .excludeGlobalFeatures( GlobalFeature.XMLStructureDefinitions, GlobalFeature.Callbacks,