Skip to content

Commit 0a9e748

Browse files
authored
Merge pull request #622 from swagger-api/bump-parser-and-issue-10090
refs swagger-api/swagger-codegen#10090 - fix typescript-angular apiKey - bump deps versions
2 parents 1130576 + 9ccbd92 commit 0a9e748

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@
253253
</dependencies>
254254
<properties>
255255
<swagger-codegen-version>3.0.19-SNAPSHOT</swagger-codegen-version>
256-
<swagger-parser-version>2.0.18</swagger-parser-version>
257-
<swagger-core-version>2.1.1</swagger-core-version>
258-
<jackson-version>2.10.1</jackson-version>
256+
<swagger-parser-version>2.0.19-SNAPSHOT</swagger-parser-version>
257+
<swagger-core-version>2.1.2-SNAPSHOT</swagger-core-version>
258+
<jackson-version>2.10.3</jackson-version>
259259
<scala-version>2.11.1</scala-version>
260260
<felix-version>3.3.0</felix-version>
261261
<commons-io-version>2.4</commons-io-version>

src/main/resources/handlebars/typescript-angular/api.service.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ export class {{classname}} {
200200
// authentication ({{name}}) required
201201
{{#isApiKey}}
202202
{{#isKeyInHeader}}
203-
if (this.configuration.apiKeys["{{keyParamName}}"]) {
203+
if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) {
204204
{{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]);
205205
}
206206

207207
{{/isKeyInHeader}}
208208
{{#isKeyInQuery}}
209-
if (this.configuration.apiKeys["{{keyParamName}}"]) {
209+
if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) {
210210
{{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]);
211211
}
212212

src/main/resources/mustache/typescript-angular/api.service.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ export class {{classname}} {
200200
// authentication ({{name}}) required
201201
{{#isApiKey}}
202202
{{#isKeyInHeader}}
203-
if (this.configuration.apiKeys["{{keyParamName}}"]) {
203+
if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) {
204204
{{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]);
205205
}
206206

207207
{{/isKeyInHeader}}
208208
{{#isKeyInQuery}}
209-
if (this.configuration.apiKeys["{{keyParamName}}"]) {
209+
if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) {
210210
{{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]);
211211
}
212212

0 commit comments

Comments
 (0)