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 ceaa772307f9..3117e9fe1ae0 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 @@ protected ImmutableMap.Builder addMustacheLambdas() { .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 000000000000..b724a52dd849 --- /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 3292a1e8668a..c71bc79b99b0 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 269d20c4d47e..65a97f9ef1b6 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 aadf2c7316ed..6085b51e5e45 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 51c272996312..8980bb997e43 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 915be7ae8bad..6b2a30f1db4c 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 bd3a511b2e90..f49e2200d1c9 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 4a1cd29ada7a..e169ad74f907 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 bc79234f09b1..d4a6816894fa 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 f098e2395926..f8d73a608a3d 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 a045056a06af..599ba401258a 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -78,7 +78,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) 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 e61d43a1ad14..f80378fcd004 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 ced7c2c5db95..780d21e19bfa 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 cac891cb06cd..92e5a48277df 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 4a1cd29ada7a..e169ad74f907 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 31e5b9963e22..f558e4f790ee 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 f098e2395926..f8d73a608a3d 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 1313a1cd6f1c..231c516c999c 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -78,7 +78,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) 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 e61d43a1ad14..f80378fcd004 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 915be7ae8bad..6b2a30f1db4c 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 bd3a511b2e90..f49e2200d1c9 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 4a1cd29ada7a..e169ad74f907 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 bc79234f09b1..d4a6816894fa 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 f098e2395926..f8d73a608a3d 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 a045056a06af..599ba401258a 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -78,7 +78,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) 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 3945e6496785..93b446dcf4e6 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 ced7c2c5db95..780d21e19bfa 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 cac891cb06cd..92e5a48277df 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 4a1cd29ada7a..e169ad74f907 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 31e5b9963e22..f558e4f790ee 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 f098e2395926..f8d73a608a3d 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 1313a1cd6f1c..231c516c999c 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -78,7 +78,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) 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 3945e6496785..93b446dcf4e6 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 915be7ae8bad..6b2a30f1db4c 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 bd3a511b2e90..f49e2200d1c9 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 4a1cd29ada7a..e169ad74f907 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 464aeeb875e4..cf04070a0144 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 7d6c118e4dbb..f99d2c20a16c 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 08acacc801e6..5ec4a0153c1f 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -77,7 +77,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) { 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 a85b4d43cd10..63abb1005f1d 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 ced7c2c5db95..780d21e19bfa 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 cac891cb06cd..92e5a48277df 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 4a1cd29ada7a..e169ad74f907 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 80779f740952..b6b98a2950a7 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 84fdc1a9ad6a..4bec8c60b86f 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 56a5eafa0f32..1c2dd83a9089 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -79,7 +79,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) { 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 1c3d549ac2c1..291871b3bb2f 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 ced7c2c5db95..780d21e19bfa 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 cac891cb06cd..92e5a48277df 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 4a1cd29ada7a..e169ad74f907 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 e1b028a2079c..cc408b9d0fa2 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 7d6c118e4dbb..f99d2c20a16c 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 f653400e7b4d..c40d0e7b31eb 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -77,7 +77,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) { 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 a85b4d43cd10..63abb1005f1d 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 ced7c2c5db95..780d21e19bfa 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 cac891cb06cd..92e5a48277df 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 4a1cd29ada7a..e169ad74f907 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 80779f740952..b6b98a2950a7 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 84fdc1a9ad6a..4bec8c60b86f 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 56a5eafa0f32..1c2dd83a9089 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -79,7 +79,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) { 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 1c3d549ac2c1..291871b3bb2f 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 ced7c2c5db95..780d21e19bfa 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 cac891cb06cd..92e5a48277df 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 4a1cd29ada7a..e169ad74f907 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 a9ee85fe5445..92fbe7e6e8e5 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 @@ public async Task GetPetByIdAsync(long petId, System.Thr 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 5db6685f3fdd..823c5a23c022 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 @@ public async Task GetInventoryAsync(System.Threading.C 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 1313a1cd6f1c..231c516c999c 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 @@ static ClientUtils() public enum ApiKeyHeader { /// - /// The api_key header + /// The api-key header /// Api_key, /// @@ -78,7 +78,7 @@ public static string ApiKeyHeaderToString(ApiKeyHeader value) 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 a691ac75920e..e164c021dcd5 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 43c271c9f062..a7d937695efe 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 ced7c2c5db95..780d21e19bfa 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 7e996cb99b9c..b7d549524b65 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 f9552813fa38..906dd878740b 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 b019ba4c713a..2df4d52bf04e 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 fe9f83b0867b..4c0ad42e317b 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory // 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory // 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 7ed667daef7c..0b0000c20162 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 ced7c2c5db95..780d21e19bfa 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 249bc72ed0fe..5272a0b102c3 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 179da0ff637e..851bb29bcf98 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 848cd61975b4..96d721326221 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 e8882b0fc2e4..57193a85d293 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory 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 d23ecc8209fd..74c75506625a 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 ced7c2c5db95..780d21e19bfa 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 00a45b118d44..3db7da1cd2fa 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 179da0ff637e..851bb29bcf98 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 8db5fd36849d..086ecc412983 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 e8882b0fc2e4..57193a85d293 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory 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 088bf6a1c0b6..ba9d1230ee6a 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 ced7c2c5db95..780d21e19bfa 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 00a45b118d44..3db7da1cd2fa 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 179da0ff637e..851bb29bcf98 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 50a18a30d648..6ed239a3de4f 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 @@ public Org.OpenAPITools.Client.ApiResponse GetPetByIdWithHttpInfo(long petI 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 1310a55c28a8..75237b00758c 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory // 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 @@ public Org.OpenAPITools.Client.ApiResponse> GetInventory // 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