File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/powershell Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,15 +178,15 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
178178 { {#authMethods} }
179179 { {#isApiKey} }
180180 { {#isKeyInHeader} }
181- if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{ {{name } }}"]) {
182- $LocalVarHeaderParameters [' {{{name }}}' ] = $Configuration [" ApiKey" ][" {{{name }}}" ]
183- Write-Verbose (" Using API key '{{{name }}}' in the header for authentication in {0}" -f $MyInvocation .MyCommand)
181+ if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{ {{keyParamName } }}"]) {
182+ $LocalVarHeaderParameters [' {{{keyParamName }}}' ] = $Configuration [" ApiKey" ][" {{{keyParamName }}}" ]
183+ Write-Verbose (" Using API key '{{{keyParamName }}}' in the header for authentication in {0}" -f $MyInvocation .MyCommand)
184184 }
185185 { {/isKeyInHeader} }
186186 { {#isKeyInQuery} }
187- if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{ {{name } }}"]) {
188- $LocalVarQueryParameters [' {{{name }}}' ] = $Configuration [" ApiKey" ][" {{{name }}}" ]
189- Write-Verbose (" Using API key `{{{name }}}` in the URL query for authentication in {0}" -f $MyInvocation .MyCommand)
187+ if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["{ {{keyParamName } }}"]) {
188+ $LocalVarQueryParameters [' {{{keyParamName }}}' ] = $Configuration [" ApiKey" ][" {{{keyParamName }}}" ]
189+ Write-Verbose (" Using API key `{{{keyParamName }}}` in the URL query for authentication in {0}" -f $MyInvocation .MyCommand)
190190 }
191191 { {/isKeyInQuery} }
192192 { {#isKeyInCookie} }
You can’t perform that action at this time.
0 commit comments