diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md
index 4bb53da53f33..e28db5019936 100644
--- a/docs/generators/cpp-qt-client.md
+++ b/docs/generators/cpp-qt-client.md
@@ -237,10 +237,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ApiKey|✓|OAS2,OAS3
|OpenIDConnect|✗|OAS3
|BearerToken|✓|OAS3
-|OAuth2_Implicit|✓|OAS2,OAS3
-|OAuth2_Password|✓|OAS2,OAS3
-|OAuth2_ClientCredentials|✓|OAS2,OAS3
-|OAuth2_AuthorizationCode|✓|OAS2,OAS3
+|OAuth2_Implicit|✗|OAS2,OAS3
+|OAuth2_Password|✗|OAS2,OAS3
+|OAuth2_ClientCredentials|✗|OAS2,OAS3
+|OAuth2_AuthorizationCode|✗|OAS2,OAS3
### Wire Format Feature
| Name | Supported | Defined By |
diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md
index 4fc97b939ae2..9dfbb390514c 100644
--- a/docs/generators/cpp-restsdk.md
+++ b/docs/generators/cpp-restsdk.md
@@ -12,7 +12,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | ||
|generateGMocksForApis|Generate Google Mock classes for APIs.| |null|
|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.client.model|
-|packageName|C++ package (library) name.| |CppRestOpenAPIClient|
|packageVersion|C++ package version.| |1.0.0|
|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
|variableNameFirstCharacterUppercase|Make first character of variable name uppercase (eg. value -> Value)| |true|
diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md
index b79135246bb9..ad12d347dfe5 100644
--- a/docs/generators/crystal.md
+++ b/docs/generators/crystal.md
@@ -59,7 +59,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
abstract
alias
-
annotation
as
as?
asm
diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md
index bb138ef414d0..7a30e18f899e 100644
--- a/docs/generators/csharp-netcore.md
+++ b/docs/generators/csharp-netcore.md
@@ -31,7 +31,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|sourceFolder|source folder for generated code| |src|
-|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.0`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp2.0**
.NET Core 2.0 compatible
**netcoreapp2.1**
.NET Core 2.1 compatible
**netcoreapp3.0**
.NET Core 3.0 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net5.0**
.NET 5.0 compatible
**net6.0**
.NET 6.0 compatible
|netstandard2.0|
+|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.0`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp2.0**
.NET Core 2.0 compatible
**netcoreapp2.1**
.NET Core 2.1 compatible
**netcoreapp3.0**
.NET Core 3.0 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net5.0**
.NET 5.0 compatible
|netstandard2.0|
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false|
diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md
index de363c1ca6bb..c7157a7f1e24 100644
--- a/docs/generators/fsharp-functions.md
+++ b/docs/generators/fsharp-functions.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
-|sourceFolder|source folder for generated code| |OpenAPI/src|
+|sourceFolder|source folder for generated code| |OpenAPI\src|
## IMPORT MAPPING
diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md
index f374168aa71f..66150dbec0de 100644
--- a/docs/generators/fsharp-giraffe-server.md
+++ b/docs/generators/fsharp-giraffe-server.md
@@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|packageVersion|F# package version.| |1.0.0|
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
-|sourceFolder|source folder for generated code| |OpenAPI/src|
+|sourceFolder|source folder for generated code| |OpenAPI\src|
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false|
diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md
index 309bc1a3dbb9..c9eee0551883 100644
--- a/docs/generators/java-inflector.md
+++ b/docs/generators/java-inflector.md
@@ -49,7 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
-|sourceFolder|source folder for generated code| |src/gen/java|
+|sourceFolder|source folder for generated code| |src\gen\java|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## IMPORT MAPPING
diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md
index ad1c60900364..6b027c2b7ba0 100644
--- a/docs/generators/jaxrs-cxf-client.md
+++ b/docs/generators/jaxrs-cxf-client.md
@@ -49,7 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
-|sourceFolder|source folder for generated code| |src/gen/java|
+|sourceFolder|source folder for generated code| |src\gen\java|
|useBeanValidation|Use BeanValidation API annotations| |false|
|useGenericResponse|Use generic response| |false|
|useGzipFeatureForTests|Use Gzip Feature for tests| |false|
diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md
index 786ff7013ebb..8831b2ff50c3 100644
--- a/docs/generators/kotlin.md
+++ b/docs/generators/kotlin.md
@@ -18,7 +18,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|library|Library template (sub-template) to use|
|jvm-okhttp4|
|modelMutable|Create mutable models| |false|
|moshiCodeGen|Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info.| |false|
-|omitGradlePluginVersions|Whether to declare Gradle plugin versions in build files.| |false|
|packageName|Generated artifact package name.| |org.openapitools.client|
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
**toJson**
[DEFAULT] Date formatter option using a json converter.
**toString**
Use the 'toString'-method of the date-time object to retrieve the related string representation.
|toJson|
diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md
index a7d1f1d095b5..104a47fe59ca 100644
--- a/docs/generators/protobuf-schema.md
+++ b/docs/generators/protobuf-schema.md
@@ -7,8 +7,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
-|numberedFieldNumberList|Field numbers in order.| |false|
-|startEnumsWithUnknown|Introduces "UNKNOWN" as the first element of enumerations.| |false|
## IMPORT MAPPING
diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md
index 3d27821c2315..57a24f0a4fcc 100644
--- a/docs/generators/scala-akka-http-server.md
+++ b/docs/generators/scala-akka-http-server.md
@@ -13,7 +13,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|artifactId|artifactId| |openapi-scala-akka-http-server|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|asManagedSources|Resulting files cab be used as managed resources. No build files or default controllers will be generated| |false|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md
index 1cc19c6216da..ed08538d6dd4 100644
--- a/docs/generators/scala-akka.md
+++ b/docs/generators/scala-akka.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md
index 6daaef5d657e..f755f8114154 100644
--- a/docs/generators/scala-gatling.md
+++ b/docs/generators/scala-gatling.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md
index 4bd12dca9552..4e0af9a429a0 100644
--- a/docs/generators/scala-httpclient-deprecated.md
+++ b/docs/generators/scala-httpclient-deprecated.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md
index ed197a23e5eb..29bad40ec7b8 100644
--- a/docs/generators/scala-lagom-server.md
+++ b/docs/generators/scala-lagom-server.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md
index 9425f8f5c973..e7096db2e6a9 100644
--- a/docs/generators/scala-sttp.md
+++ b/docs/generators/scala-sttp.md
@@ -10,7 +10,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|circeVersion|The version of circe library| |0.13.0|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md
index 9159c798f233..bd9b546d6d74 100644
--- a/docs/generators/scalatra.md
+++ b/docs/generators/scalatra.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md
index 18520f5e3b3f..7840e86251a4 100644
--- a/docs/generators/scalaz.md
+++ b/docs/generators/scalaz.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
-|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (preferred for JDK 1.8+)
|java8|
+|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index 34e4a6a266cb..b30cc56af406 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -46,7 +46,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
-|oas3|Use OAS 3 Swagger annotations instead of OAS 2 annotations| |false|
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
@@ -71,7 +70,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false|
|useBeanValidation|Use BeanValidation API annotations| |true|
|useOptional|Use Optional container for optional parameters| |false|
-|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useTags|use tags for creating interface and controller classnames| |false|
|virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md
index 95f50fca7fc1..145ad82601a8 100644
--- a/docs/generators/swift5.md
+++ b/docs/generators/swift5.md
@@ -38,11 +38,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine, AsyncAwait are available.| |null|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
-|swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null|
+|swiftPackagePath|Set a custom source path instead of OpenAPIClient\Classes\OpenAPIs.| |null|
|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null|
|useBacktickEscapes|Escape reserved words using backticks (default: false)| |false|
|useClasses|Use final classes for models instead of structs (default: false)| |false|
-|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null|
+|useSPMFileStructure|Use SPM file structure and set the source path to Sources\{{projectName}} (default: false).| |null|
## IMPORT MAPPING
diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache
index 6c810f89bc1e..522cfed17e2c 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache
@@ -116,6 +116,7 @@ namespace {{packageName}}.Client
DefaultHeaders = new {{^net35}}Concurrent{{/net35}}Dictionary();
ApiKey = new {{^net35}}Concurrent{{/net35}}Dictionary();
ApiKeyPrefix = new {{^net35}}Concurrent{{/net35}}Dictionary();
+ GetAccessToken = () => AccessToken;
{{#servers}}
{{#-first}}
Servers = new List>()
@@ -294,6 +295,16 @@ namespace {{packageName}}.Client
/// The access token.
public virtual string AccessToken { get; set; }
+
+ ///
+ /// Gets the Access Token
+ ///
+ /// This helper function allows for customization of the Access Token retrieval.
+ /// For example, automatic JWT token refreshes.
+ ///
+ /// The access token.
+ public virtual Func GetAccessToken { get; set; }
+
///
/// Gets or sets the temporary folder path to store the files downloaded from the server.
///
@@ -565,10 +576,11 @@ namespace {{packageName}}.Client
HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration,
{{/hasHttpSignatureMethods}}
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
- DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat
+ DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
+ GetAccessToken = second.GetAccessToken ?? first.GetAccessToken
};
return config;
}
#endregion Static Members
}
-}
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache
index bf142ffbac1e..4affb761a34c 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/IReadableConfiguration.mustache
@@ -18,6 +18,8 @@ namespace {{packageName}}.Client
/// Access token.
string AccessToken { get; }
+ Func GetAccessToken {get;}
+
///
/// Gets the API key.
///
@@ -111,4 +113,4 @@ namespace {{packageName}}.Client
HttpSigningConfiguration HttpSigningConfiguration { get; }
{{/hasHttpSignatureMethods}}
}
-}
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache
index ce2000f63e97..d7097ae576cb 100644
--- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache
@@ -31,11 +31,12 @@ namespace {{packageName}}.{{apiPackage}}
{{/notes}}
/// Thrown when fails to make API call
{{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
- {{/allParams}}/// {{returnType}}
+ {{/allParams}}///
+ /// {{returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}});
+ {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}{{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions));
///
/// {{summary}}
@@ -45,11 +46,12 @@ namespace {{packageName}}.{{apiPackage}}
///
/// Thrown when fails to make API call
{{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
- {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}
+ {{/allParams}}///
+ /// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}});
+ ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}{{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions));
{{/operation}}
#endregion Synchronous Operations
}
@@ -73,11 +75,12 @@ namespace {{packageName}}.{{apiPackage}}
/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
{{/allParams}}
/// Cancellation Token to cancel the request.
+ ///
/// Task of {{returnType}}{{^returnType}}void{{/returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), {{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions));
///
/// {{summary}}
@@ -90,11 +93,12 @@ namespace {{packageName}}.{{apiPackage}}
/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
{{/allParams}}
/// Cancellation Token to cancel the request.
+ ///
/// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), {{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions));
{{/operation}}
#endregion Asynchronous Operations
}
@@ -233,14 +237,15 @@ namespace {{packageName}}.{{apiPackage}}
///
/// Thrown when fails to make API call
{{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
- {{/allParams}}/// {{returnType}}
+ {{/allParams}}///
+ /// {{returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
+ public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}{{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions))
{
- {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
- return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}}
+ {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}localVarRequestOptions);
+ return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}localVarRequestOptions);{{/returnType}}
}
///
@@ -248,11 +253,12 @@ namespace {{packageName}}.{{apiPackage}}
///
/// Thrown when fails to make API call
{{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
- {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}
+ {{/allParams}}///
+ /// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
+ public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}{{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions))
{
{{#allParams}}
{{#required}}
@@ -266,7 +272,12 @@ namespace {{packageName}}.{{apiPackage}}
{{/vendorExtensions.x-csharp-value-type}}
{{/required}}
{{/allParams}}
- {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions();
+ if(localVarRequestOptions == default({{packageName}}.Client.RequestOptions))
+ {
+ localVarRequestOptions = new {{packageName}}.Client.RequestOptions();
+ }
+
+
string[] _contentTypes = new string[] {
{{#consumes}}
@@ -422,16 +433,36 @@ namespace {{packageName}}.{{apiPackage}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// bearer authentication required
- if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ if (this.Configuration.GetAccessToken != null)
+ {
+ var accessToken = this.Configuration.GetAccessToken();
+
+ if (!string.IsNullOrEmpty(accessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
+ }
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+
}
{{/isBasicBearer}}
{{#isOAuth}}
// oauth required
- if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ if (this.Configuration.GetAccessToken != null)
+ {
+ var accessToken = this.Configuration.GetAccessToken();
+
+ if (!string.IsNullOrEmpty(accessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
+ }
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+
}
{{/isOAuth}}
{{#isHttpSignature}}
@@ -476,14 +507,15 @@ namespace {{packageName}}.{{apiPackage}}
/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
{{/allParams}}
/// Cancellation Token to cancel the request.
+ ///
/// Task of {{returnType}}{{^returnType}}void{{/returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), {{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions))
{
- {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);
- return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}}
+ {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken, localVarRequestOptions).ConfigureAwait(false);
+ return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken, localVarRequestOptions).ConfigureAwait(false);{{/returnType}}
}
///
@@ -494,11 +526,12 @@ namespace {{packageName}}.{{apiPackage}}
/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}
{{/allParams}}
/// Cancellation Token to cancel the request.
+ ///
/// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}
{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
- public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), {{packageName}}.Client.RequestOptions localVarRequestOptions = default({{packageName}}.Client.RequestOptions))
{
{{#allParams}}
{{#required}}
@@ -513,7 +546,10 @@ namespace {{packageName}}.{{apiPackage}}
{{/required}}
{{/allParams}}
- {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions();
+ if(localVarRequestOptions == default({{packageName}}.Client.RequestOptions))
+ {
+ localVarRequestOptions = new {{packageName}}.Client.RequestOptions();
+ }
string[] _contentTypes = new string[] {
{{#consumes}}
@@ -647,17 +683,37 @@ namespace {{packageName}}.{{apiPackage}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// bearer authentication required
- if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ if (this.Configuration.GetAccessToken != null)
+ {
+ var accessToken = this.Configuration.GetAccessToken();
+
+ if (!string.IsNullOrEmpty(accessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
+ }
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+
}
{{/isBasicBearer}}
{{/isBasic}}
{{#isOAuth}}
// oauth required
- if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ if (this.Configuration.GetAccessToken != null)
+ {
+ var accessToken = this.Configuration.GetAccessToken();
+
+ if (!string.IsNullOrEmpty(accessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
+ }
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+
}
{{/isOAuth}}
{{#isHttpSignature}}
@@ -698,4 +754,4 @@ namespace {{packageName}}.{{apiPackage}}
{{/operation}}
}
{{/operations}}
-}
+}
\ No newline at end of file
diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs
index aa92ab8297b3..f25d5865199e 100644
--- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs
+++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Api/MultipartApi.cs
@@ -34,8 +34,9 @@ public interface IMultipartApiSync : IApiAccessor
///
/// Thrown when fails to make API call
/// Many files (optional)
+ ///
///
- void MultipartArray(List files = default(List));
+ void MultipartArray(List files = default(List), Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = default(Org.OpenAPITools.Client.RequestOptions));
///
///
@@ -45,8 +46,9 @@ public interface IMultipartApiSync : IApiAccessor
///
/// Thrown when fails to make API call
/// Many files (optional)
+ ///
/// ApiResponse of Object(void)
- ApiResponse