fix(typescript-nestjs): initialize queryParameters in Service if auth uses apikey but has no other query parameters (#12940)

This commit is contained in:
Paul Hagedorn
2022-07-20 19:33:09 +02:00
committed by GitHub
parent 05f4792df7
commit 33ec914e6a

View File

@@ -121,6 +121,9 @@ export class {{classname}} {
{{/isKeyInHeader}}
{{#isKeyInQuery}}
{{^hasQueryParams}}
let queryParameters = {};
{{/hasQueryParams}}
if (this.configuration.apiKeys["{{keyParamName}}"]) {
queryParameters['{{keyParamName}}'] = this.configuration.apiKeys["{{keyParamName}}"];
}