forked from loafle/openapi-generator-original
[csharp][generichost] Fix invalid key name (#19633)
* fix invalid key name * fix comment
This commit is contained in:
parent
0b32c5025e
commit
fb5e69f83a
@ -450,7 +450,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen {
|
|||||||
.put("uniqueLines", new UniqueLambda("\n", false))
|
.put("uniqueLines", new UniqueLambda("\n", false))
|
||||||
.put("unique", new UniqueLambda("\n", true))
|
.put("unique", new UniqueLambda("\n", true))
|
||||||
.put("camel_case", new CamelCaseLambda())
|
.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
|
@Override
|
||||||
|
@ -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:
|
||||||
|
* <pre>
|
||||||
|
* additionalProperties.put("regex", new ReplaceAllLambda());
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* Use:
|
||||||
|
* <pre>
|
||||||
|
* {{#regex}}{{summary}}{{/regex}}
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
@ -31,7 +31,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
{{#lambda.trimTrailingWithNewLine}}
|
{{#lambda.trimTrailingWithNewLine}}
|
||||||
{{#apiKeyMethods}}
|
{{#apiKeyMethods}}
|
||||||
string apiKeyTokenValue{{-index}} = context.Configuration["<token>"] ?? throw new Exception("Token not found.");
|
string apiKeyTokenValue{{-index}} = context.Configuration["<token>"] ?? 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}});
|
options.AddTokens(apiKeyToken{{-index}});
|
||||||
|
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
|
@ -60,7 +60,7 @@ using System.Runtime.CompilerServices;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The {{keyParamName}} header
|
/// The {{keyParamName}} header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}{{^-last}},{{/-last}}
|
{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}{{^-last}},{{/-last}}
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ using System.Runtime.CompilerServices;
|
|||||||
return value switch
|
return value switch
|
||||||
{
|
{
|
||||||
{{#apiKeyMethods}}
|
{{#apiKeyMethods}}
|
||||||
ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}} => "{{keyParamName}}",
|
ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}} => "{{keyParamName}}",
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
||||||
};
|
};
|
||||||
@ -85,7 +85,7 @@ using System.Runtime.CompilerServices;
|
|||||||
switch(value)
|
switch(value)
|
||||||
{
|
{
|
||||||
{{#apiKeyMethods}}
|
{{#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}}";
|
return "{{keyParamName}}";
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
default:
|
default:
|
||||||
|
@ -21,7 +21,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
{
|
{
|
||||||
{{#lambda.trimTrailingWithNewLine}}
|
{{#lambda.trimTrailingWithNewLine}}
|
||||||
{{#apiKeyMethods}}
|
{{#apiKeyMethods}}
|
||||||
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
||||||
options.AddTokens(apiKeyToken{{-index}});
|
options.AddTokens(apiKeyToken{{-index}});
|
||||||
|
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
@ -55,7 +55,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
{
|
{
|
||||||
{{#lambda.trimTrailingWithNewLine}}
|
{{#lambda.trimTrailingWithNewLine}}
|
||||||
{{#apiKeyMethods}}
|
{{#apiKeyMethods}}
|
||||||
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
||||||
options.AddTokens(apiKeyToken{{-index}});
|
options.AddTokens(apiKeyToken{{-index}});
|
||||||
|
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
@ -92,7 +92,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
{
|
{
|
||||||
{{#lambda.trimTrailingWithNewLine}}
|
{{#lambda.trimTrailingWithNewLine}}
|
||||||
{{#apiKeyMethods}}
|
{{#apiKeyMethods}}
|
||||||
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
||||||
options.AddTokens(apiKeyToken{{-index}});
|
options.AddTokens(apiKeyToken{{-index}});
|
||||||
|
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
@ -129,7 +129,7 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
{
|
{
|
||||||
{{#lambda.trimTrailingWithNewLine}}
|
{{#lambda.trimTrailingWithNewLine}}
|
||||||
{{#apiKeyMethods}}
|
{{#apiKeyMethods}}
|
||||||
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("<token>", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1));
|
||||||
options.AddTokens(apiKeyToken{{-index}});
|
options.AddTokens(apiKeyToken{{-index}});
|
||||||
|
|
||||||
{{/apiKeyMethods}}
|
{{/apiKeyMethods}}
|
||||||
|
@ -1379,7 +1379,7 @@ components:
|
|||||||
'read:pets': read your pets
|
'read:pets': read your pets
|
||||||
api_key:
|
api_key:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
name: api_key
|
name: api-key
|
||||||
in: header
|
in: header
|
||||||
api_key_query:
|
api_key_query:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
|
@ -3045,7 +3045,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
switch(value)
|
switch(value)
|
||||||
{
|
{
|
||||||
case ApiKeyHeader.Api_key:
|
case ApiKeyHeader.Api_key:
|
||||||
return "api_key";
|
return "api-key";
|
||||||
case ApiKeyHeader.Api_key_query:
|
case ApiKeyHeader.Api_key_query:
|
||||||
return "api_key_query";
|
return "api_key_query";
|
||||||
default:
|
default:
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
switch(value)
|
switch(value)
|
||||||
{
|
{
|
||||||
case ApiKeyHeader.Api_key:
|
case ApiKeyHeader.Api_key:
|
||||||
return "api_key";
|
return "api-key";
|
||||||
case ApiKeyHeader.Api_key_query:
|
case ApiKeyHeader.Api_key_query:
|
||||||
return "api_key_query";
|
return "api_key_query";
|
||||||
default:
|
default:
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3045,7 +3045,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
switch(value)
|
switch(value)
|
||||||
{
|
{
|
||||||
case ApiKeyHeader.Api_key:
|
case ApiKeyHeader.Api_key:
|
||||||
return "api_key";
|
return "api-key";
|
||||||
case ApiKeyHeader.Api_key_query:
|
case ApiKeyHeader.Api_key_query:
|
||||||
return "api_key_query";
|
return "api_key_query";
|
||||||
default:
|
default:
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1699,7 +1699,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
switch(value)
|
switch(value)
|
||||||
{
|
{
|
||||||
case ApiKeyHeader.Api_key:
|
case ApiKeyHeader.Api_key:
|
||||||
return "api_key";
|
return "api-key";
|
||||||
case ApiKeyHeader.Api_key_query:
|
case ApiKeyHeader.Api_key_query:
|
||||||
return "api_key_query";
|
return "api_key_query";
|
||||||
default:
|
default:
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3045,7 +3045,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1702,7 +1702,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -77,7 +77,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
return value switch
|
return value switch
|
||||||
{
|
{
|
||||||
ApiKeyHeader.Api_key => "api_key",
|
ApiKeyHeader.Api_key => "api-key",
|
||||||
ApiKeyHeader.Api_key_query => "api_key_query",
|
ApiKeyHeader.Api_key_query => "api_key_query",
|
||||||
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
||||||
};
|
};
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1704,7 +1704,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
return value switch
|
return value switch
|
||||||
{
|
{
|
||||||
ApiKeyHeader.Api_key => "api_key",
|
ApiKeyHeader.Api_key => "api-key",
|
||||||
ApiKeyHeader.Api_key_query => "api_key_query",
|
ApiKeyHeader.Api_key_query => "api_key_query",
|
||||||
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
||||||
};
|
};
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1702,7 +1702,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -77,7 +77,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
return value switch
|
return value switch
|
||||||
{
|
{
|
||||||
ApiKeyHeader.Api_key => "api_key",
|
ApiKeyHeader.Api_key => "api-key",
|
||||||
ApiKeyHeader.Api_key_query => "api_key_query",
|
ApiKeyHeader.Api_key_query => "api_key_query",
|
||||||
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
||||||
};
|
};
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1704,7 +1704,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
return value switch
|
return value switch
|
||||||
{
|
{
|
||||||
ApiKeyHeader.Api_key => "api_key",
|
ApiKeyHeader.Api_key => "api-key",
|
||||||
ApiKeyHeader.Api_key_query => "api_key_query",
|
ApiKeyHeader.Api_key_query => "api_key_query",
|
||||||
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
_ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)),
|
||||||
};
|
};
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1698,7 +1698,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ namespace Org.OpenAPITools.Api
|
|||||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/store/inventory";
|
||||||
|
|
||||||
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
List<TokenBase> tokenBaseLocalVars = new List<TokenBase>();
|
||||||
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);
|
tokenBaseLocalVars.Add(apiKeyTokenLocalVar1);
|
||||||
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
apiKeyTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
public enum ApiKeyHeader
|
public enum ApiKeyHeader
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api_key header
|
/// The api-key header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Api_key,
|
Api_key,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Client
|
|||||||
switch(value)
|
switch(value)
|
||||||
{
|
{
|
||||||
case ApiKeyHeader.Api_key:
|
case ApiKeyHeader.Api_key:
|
||||||
return "api_key";
|
return "api-key";
|
||||||
case ApiKeyHeader.Api_key_query:
|
case ApiKeyHeader.Api_key_query:
|
||||||
return "api_key_query";
|
return "api_key_query";
|
||||||
default:
|
default:
|
||||||
|
@ -134,7 +134,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -299,7 +299,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -426,9 +426,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -127,9 +127,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
|
||||||
HttpClient httpClient = new HttpClient();
|
HttpClient httpClient = new HttpClient();
|
||||||
|
@ -1311,9 +1311,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
|
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
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
|
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
||||||
|
@ -565,9 +565,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
|
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
@ -622,9 +622,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
|
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
|
@ -286,7 +286,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1457,9 +1457,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
||||||
@ -1535,9 +1535,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
||||||
|
@ -528,9 +528,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
@ -597,9 +597,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
|
@ -274,7 +274,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1457,9 +1457,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
||||||
@ -1535,9 +1535,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
||||||
|
@ -528,9 +528,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
@ -597,9 +597,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.OperationIndex = operationIndex;
|
localVarRequestOptions.OperationIndex = operationIndex;
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
|
@ -260,7 +260,7 @@ Authentication schemes defined for the API:
|
|||||||
### api_key
|
### api_key
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api-key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
<a id="api_key_query"></a>
|
<a id="api_key_query"></a>
|
||||||
|
@ -3069,7 +3069,7 @@ components:
|
|||||||
type: oauth2
|
type: oauth2
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api-key
|
||||||
type: apiKey
|
type: apiKey
|
||||||
api_key_query:
|
api_key_query:
|
||||||
in: query
|
in: query
|
||||||
|
@ -409,9 +409,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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
|
// Configure API key authorization: api_key_query
|
||||||
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
config.AddApiKey("api_key_query", "YOUR_API_KEY");
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
@ -122,9 +122,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
// Configure API key authorization: api_key
|
// 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
|
// 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);
|
var apiInstance = new StoreApi(config);
|
||||||
|
|
||||||
|
@ -1285,9 +1285,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
|
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
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
|
localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// authentication (api_key_query) required
|
||||||
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query")))
|
||||||
|
@ -506,9 +506,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
|
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
@ -568,9 +568,9 @@ namespace Org.OpenAPITools.Api
|
|||||||
|
|
||||||
|
|
||||||
// authentication (api_key) required
|
// 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
|
// make the HTTP request
|
||||||
|
Loading…
x
Reference in New Issue
Block a user