diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index ceaa772307f..3117e9fe1ae 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -450,7 +450,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen {
.put("uniqueLines", new UniqueLambda("\n", false))
.put("unique", new UniqueLambda("\n", true))
.put("camel_case", new CamelCaseLambda())
- .put("escape_reserved_word", new EscapeKeywordLambda(this::escapeKeyword));
+ .put("escape_reserved_word", new EscapeKeywordLambda(this::escapeKeyword))
+ .put("alphabet_or_underscore", new ReplaceAllLambda("[^A-Za-z]", "_"));
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ReplaceAllLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ReplaceAllLambda.java
new file mode 100644
index 00000000000..b724a52dd84
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ReplaceAllLambda.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.templating.mustache;
+
+import com.samskivert.mustache.Mustache;
+import com.samskivert.mustache.Template;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * Replaces all regex captures with the provided string.
+ *
+ * Register:
+ *
+ * additionalProperties.put("regex", new ReplaceAllLambda());
+ *
+ *
+ * Use:
+ *
+ * {{#regex}}{{summary}}{{/regex}}
+ *
+ */
+public class ReplaceAllLambda implements Mustache.Lambda {
+ private String regex;
+ private String replacement;
+
+ public ReplaceAllLambda(String regex, String replacement) {
+ this.regex = regex;
+ this.replacement = replacement;
+ }
+
+ @Override
+ public void execute(Template.Fragment fragment, Writer writer) throws IOException {
+ writer.write(fragment.execute()
+ .replaceAll(regex, replacement));
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiTestsBase.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiTestsBase.mustache
index 3292a1e8668..c71bc79b99b 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiTestsBase.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiTestsBase.mustache
@@ -31,7 +31,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
{{#lambda.trimTrailingWithNewLine}}
{{#apiKeyMethods}}
string apiKeyTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found.");
- ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
+ ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
options.AddTokens(apiKeyToken{{-index}});
{{/apiKeyMethods}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ClientUtils.mustache
index 269d20c4d47..65a97f9ef1b 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ClientUtils.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ClientUtils.mustache
@@ -60,7 +60,7 @@ using System.Runtime.CompilerServices;
///
/// The {{keyParamName}} header
///
- {{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}{{^-last}},{{/-last}}
+ {{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}{{^-last}},{{/-last}}
{{/apiKeyMethods}}
}
@@ -76,7 +76,7 @@ using System.Runtime.CompilerServices;
return value switch
{
{{#apiKeyMethods}}
- ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}} => "{{keyParamName}}",
+ ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}} => "{{keyParamName}}",
{{/apiKeyMethods}}
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
};
@@ -85,7 +85,7 @@ using System.Runtime.CompilerServices;
switch(value)
{
{{#apiKeyMethods}}
- case ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}:
+ case ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}:
return "{{keyParamName}}";
{{/apiKeyMethods}}
default:
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DependencyInjectionTests.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DependencyInjectionTests.mustache
index aadf2c7316e..6085b51e5e4 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DependencyInjectionTests.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/DependencyInjectionTests.mustache
@@ -21,7 +21,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
{
{{#lambda.trimTrailingWithNewLine}}
{{#apiKeyMethods}}
- ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
+ ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
options.AddTokens(apiKeyToken{{-index}});
{{/apiKeyMethods}}
@@ -55,7 +55,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
{
{{#lambda.trimTrailingWithNewLine}}
{{#apiKeyMethods}}
- ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
+ ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
options.AddTokens(apiKeyToken{{-index}});
{{/apiKeyMethods}}
@@ -92,7 +92,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
{
{{#lambda.trimTrailingWithNewLine}}
{{#apiKeyMethods}}
- ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
+ ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
options.AddTokens(apiKeyToken{{-index}});
{{/apiKeyMethods}}
@@ -129,7 +129,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
{
{{#lambda.trimTrailingWithNewLine}}
{{#apiKeyMethods}}
- ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
+ ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
options.AddTokens(apiKeyToken{{-index}});
{{/apiKeyMethods}}
diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index 51c27299631..8980bb997e4 100644
--- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -1379,7 +1379,7 @@ components:
'read:pets': read your pets
api_key:
type: apiKey
- name: api_key
+ name: api-key
in: header
api_key_query:
type: apiKey
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml
index 915be7ae8ba..6b2a30f1db4 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml
@@ -3045,7 +3045,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/PetApi.md
index bd3a511b2e9..f49e2200d1c 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
index bc79234f09b..d4a6816894f 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
index f098e239592..f8d73a608a3 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
index a045056a06a..599ba401258 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
switch(value)
{
case ApiKeyHeader.Api_key:
- return "api_key";
+ return "api-key";
case ApiKeyHeader.Api_key_query:
return "api_key_query";
default:
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/README.md
index e61d43a1ad1..f80378fcd00 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/PetApi.md
index cac891cb06c..92e5a48277d 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index 31e5b9963e2..f558e4f790e 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index f098e239592..f8d73a608a3 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
index 1313a1cd6f1..231c516c999 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
switch(value)
{
case ApiKeyHeader.Api_key:
- return "api_key";
+ return "api-key";
case ApiKeyHeader.Api_key_query:
return "api_key_query";
default:
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/README.md
index e61d43a1ad1..f80378fcd00 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml
index 915be7ae8ba..6b2a30f1db4 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml
@@ -3045,7 +3045,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/PetApi.md
index bd3a511b2e9..f49e2200d1c 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
index bc79234f09b..d4a6816894f 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
index f098e239592..f8d73a608a3 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
index a045056a06a..599ba401258 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
switch(value)
{
case ApiKeyHeader.Api_key:
- return "api_key";
+ return "api-key";
case ApiKeyHeader.Api_key_query:
return "api_key_query";
default:
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/README.md
index 3945e649678..93b446dcf4e 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/PetApi.md
index cac891cb06c..92e5a48277d 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index 31e5b9963e2..f558e4f790e 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index f098e239592..f8d73a608a3 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
index 1313a1cd6f1..231c516c999 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
switch(value)
{
case ApiKeyHeader.Api_key:
- return "api_key";
+ return "api-key";
case ApiKeyHeader.Api_key_query:
return "api_key_query";
default:
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/README.md
index 3945e649678..93b446dcf4e 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml
index 915be7ae8ba..6b2a30f1db4 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml
@@ -3045,7 +3045,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/PetApi.md
index bd3a511b2e9..f49e2200d1c 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
index 464aeeb875e..cf04070a014 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1702,7 +1702,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
index 7d6c118e4db..f99d2c20a16 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -619,7 +619,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
index 08acacc801e..5ec4a0153c1 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -77,7 +77,7 @@ namespace Org.OpenAPITools.Client
{
return value switch
{
- ApiKeyHeader.Api_key => "api_key",
+ ApiKeyHeader.Api_key => "api-key",
ApiKeyHeader.Api_key_query => "api_key_query",
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
};
diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/README.md
index a85b4d43cd1..63abb1005f1 100644
--- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/PetApi.md
index cac891cb06c..92e5a48277d 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/PetApi.cs
index 80779f74095..b6b98a2950a 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1704,7 +1704,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/StoreApi.cs
index 84fdc1a9ad6..4bec8c60b86 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -621,7 +621,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/ClientUtils.cs
index 56a5eafa0f3..1c2dd83a908 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Client
{
return value switch
{
- ApiKeyHeader.Api_key => "api_key",
+ ApiKeyHeader.Api_key => "api-key",
ApiKeyHeader.Api_key_query => "api_key_query",
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
};
diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/README.md
index 1c3d549ac2c..291871b3bb2 100644
--- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/PetApi.md
index cac891cb06c..92e5a48277d 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index e1b028a2079..cc408b9d0fa 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1702,7 +1702,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index 7d6c118e4db..f99d2c20a16 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -619,7 +619,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
index f653400e7b4..c40d0e7b31e 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -77,7 +77,7 @@ namespace Org.OpenAPITools.Client
{
return value switch
{
- ApiKeyHeader.Api_key => "api_key",
+ ApiKeyHeader.Api_key => "api-key",
ApiKeyHeader.Api_key_query => "api_key_query",
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
};
diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/README.md
index a85b4d43cd1..63abb1005f1 100644
--- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/PetApi.md
index cac891cb06c..92e5a48277d 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/PetApi.cs
index 80779f74095..b6b98a2950a 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1704,7 +1704,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/StoreApi.cs
index 84fdc1a9ad6..4bec8c60b86 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -621,7 +621,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/ClientUtils.cs
index 56a5eafa0f3..1c2dd83a908 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Client
{
return value switch
{
- ApiKeyHeader.Api_key => "api_key",
+ ApiKeyHeader.Api_key => "api-key",
ApiKeyHeader.Api_key_query => "api_key_query",
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
};
diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/README.md
index 1c3d549ac2c..291871b3bb2 100644
--- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/PetApi.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/PetApi.md
index cac891cb06c..92e5a48277d 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/PetApi.md
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/StoreApi.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/StoreApi.md
index 4a1cd29ada7..e169ad74f90 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/StoreApi.md
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index a9ee85fe544..92fbe7e6e8e 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1698,7 +1698,7 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index 5db6685f3fd..823c5a23c02 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -617,7 +617,7 @@ namespace Org.OpenAPITools.Api
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
List tokenBaseLocalVars = new List();
- ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api_key", cancellationToken).ConfigureAwait(false);
+ ApiKeyToken apiKeyTokenLocalVar1 = (ApiKeyToken) await ApiKeyProvider.GetAsync("api-key", cancellationToken).ConfigureAwait(false);
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
index 1313a1cd6f1..231c516c999 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
public enum ApiKeyHeader
{
///
- /// The api_key header
+ /// The api-key header
///
Api_key,
///
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
switch(value)
{
case ApiKeyHeader.Api_key:
- return "api_key";
+ return "api-key";
case ApiKeyHeader.Api_key_query:
return "api_key_query";
default:
diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/README.md
index a691ac75920..e164c021dcd 100644
--- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/README.md
+++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/README.md
@@ -134,7 +134,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md
index 43c271c9f06..a7d937695ef 100644
--- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md
+++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/README.md
@@ -299,7 +299,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md
index 7e996cb99b9..b7d549524b6 100644
--- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md
+++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/PetApi.md
@@ -426,9 +426,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/StoreApi.md b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/StoreApi.md
index f9552813fa3..906dd878740 100644
--- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/StoreApi.md
+++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/docs/StoreApi.md
@@ -127,9 +127,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index b019ba4c713..2df4d52bf04 100644
--- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1311,9 +1311,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
@@ -1377,9 +1377,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index fe9f83b0867..4c0ad42e317 100644
--- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -565,9 +565,9 @@ namespace Org.OpenAPITools.Api
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
@@ -622,9 +622,9 @@ namespace Org.OpenAPITools.Api
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/README.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/README.md
index 7ed667daef7..0b0000c2016 100644
--- a/samples/client/petstore/csharp/restsharp/net7/Petstore/README.md
+++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/README.md
@@ -286,7 +286,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md
index 249bc72ed0f..5272a0b102c 100644
--- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md
+++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/StoreApi.md b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/StoreApi.md
index 179da0ff637..851bb29bcf9 100644
--- a/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/StoreApi.md
+++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/docs/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index 848cd61975b..96d72132622 100644
--- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1457,9 +1457,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
@@ -1535,9 +1535,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index e8882b0fc2e..57193a85d29 100644
--- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -528,9 +528,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
@@ -597,9 +597,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md
index d23ecc8209f..74c75506625 100644
--- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md
+++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/README.md
@@ -274,7 +274,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml
+++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md
index 00a45b118d4..3db7da1cd2f 100644
--- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md
+++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/StoreApi.md b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/StoreApi.md
index 179da0ff637..851bb29bcf9 100644
--- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/StoreApi.md
+++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/docs/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs
index 8db5fd36849..086ecc41298 100644
--- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1457,9 +1457,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
@@ -1535,9 +1535,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs
index e8882b0fc2e..57193a85d29 100644
--- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -528,9 +528,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
@@ -597,9 +597,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md
index 088bf6a1c0b..ba9d1230ee6 100644
--- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md
+++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/README.md
@@ -260,7 +260,7 @@ Authentication schemes defined for the API:
### api_key
- **Type**: API key
-- **API key parameter name**: api_key
+- **API key parameter name**: api-key
- **Location**: HTTP header
diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml
index ced7c2c5db9..780d21e19bf 100644
--- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml
@@ -3069,7 +3069,7 @@ components:
type: oauth2
api_key:
in: header
- name: api_key
+ name: api-key
type: apiKey
api_key_query:
in: query
diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md
index 00a45b118d4..3db7da1cd2f 100644
--- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md
+++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/PetApi.md
@@ -409,9 +409,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: api_key_query
config.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/StoreApi.md b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/StoreApi.md
index 179da0ff637..851bb29bcf9 100644
--- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/StoreApi.md
+++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/docs/StoreApi.md
@@ -122,9 +122,9 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
- config.AddApiKey("api_key", "YOUR_API_KEY");
+ config.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
- // config.AddApiKeyPrefix("api_key", "Bearer");
+ // config.AddApiKeyPrefix("api-key", "Bearer");
var apiInstance = new StoreApi(config);
diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
index 50a18a30d64..6ed239a3de4 100644
--- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/PetApi.cs
@@ -1285,9 +1285,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
@@ -1356,9 +1356,9 @@ namespace Org.OpenAPITools.Api
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// authentication (api_key_query) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
index 1310a55c28a..75237b00758 100644
--- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
+++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs
@@ -506,9 +506,9 @@ namespace Org.OpenAPITools.Api
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request
@@ -568,9 +568,9 @@ namespace Org.OpenAPITools.Api
// authentication (api_key) required
- if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
+ if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key")))
{
- localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key"));
+ localVarRequestOptions.HeaderParameters.Add("api-key", this.Configuration.GetApiKeyWithPrefix("api-key"));
}
// make the HTTP request