forked from loafle/openapi-generator-original
fix: use apikey name in header instead of securityDefinition spec id (#17022)
This commit is contained in:
parent
2b9ee8c5f6
commit
6917aad760
@ -178,15 +178,15 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
|
||||
{{#authMethods}}
|
||||
{{#isApiKey}}
|
||||
{{#isKeyInHeader}}
|
||||
if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{{{name}}}"]) {
|
||||
$LocalVarHeaderParameters['{{{name}}}'] = $Configuration["ApiKey"]["{{{name}}}"]
|
||||
Write-Verbose ("Using API key '{{{name}}}' in the header for authentication in {0}" -f $MyInvocation.MyCommand)
|
||||
if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{{{keyParamName}}}"]) {
|
||||
$LocalVarHeaderParameters['{{{keyParamName}}}'] = $Configuration["ApiKey"]["{{{keyParamName}}}"]
|
||||
Write-Verbose ("Using API key '{{{keyParamName}}}' in the header for authentication in {0}" -f $MyInvocation.MyCommand)
|
||||
}
|
||||
{{/isKeyInHeader}}
|
||||
{{#isKeyInQuery}}
|
||||
if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{{{name}}}"]) {
|
||||
$LocalVarQueryParameters['{{{name}}}'] = $Configuration["ApiKey"]["{{{name}}}"]
|
||||
Write-Verbose ("Using API key `{{{name}}}` in the URL query for authentication in {0}" -f $MyInvocation.MyCommand)
|
||||
if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{{{keyParamName}}}"]) {
|
||||
$LocalVarQueryParameters['{{{keyParamName}}}'] = $Configuration["ApiKey"]["{{{keyParamName}}}"]
|
||||
Write-Verbose ("Using API key `{{{keyParamName}}}` in the URL query for authentication in {0}" -f $MyInvocation.MyCommand)
|
||||
}
|
||||
{{/isKeyInQuery}}
|
||||
{{#isKeyInCookie}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user