forked from loafle/openapi-generator-original
[typescript-angular] Use security scheme name for API key lookup (#5220)
* [typescript-angular] Use security scheme name when looking up API keys. * [typescript-angular] Updated samples.
This commit is contained in:
@@ -278,18 +278,19 @@ export class {{classname}} {
|
||||
{{#authMethods}}
|
||||
// authentication ({{name}}) required
|
||||
{{#isApiKey}}
|
||||
if (this.configuration.apiKeys) {
|
||||
{{! Fallback behaviour may be removed for 5.0 release. See #5062 }}
|
||||
const key: string | undefined = this.configuration.apiKeys["{{name}}"] || this.configuration.apiKeys["{{keyParamName}}"];
|
||||
if (key) {
|
||||
{{#isKeyInHeader}}
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) {
|
||||
{{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]);
|
||||
}
|
||||
|
||||
{{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', key);
|
||||
{{/isKeyInHeader}}
|
||||
{{#isKeyInQuery}}
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["{{keyParamName}}"]) {
|
||||
{{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]);
|
||||
{{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', key);
|
||||
{{/isKeyInQuery}}
|
||||
}
|
||||
}
|
||||
|
||||
{{/isKeyInQuery}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
|
||||
@@ -468,8 +468,11 @@ export class PetService {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -199,8 +199,11 @@ export class StoreService {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -468,8 +468,11 @@ export class PetService {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -199,8 +199,11 @@ export class StoreService {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -471,8 +471,11 @@ export class PetService implements PetServiceInterface {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -202,8 +202,11 @@ export class StoreService implements StoreServiceInterface {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -358,8 +358,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -142,8 +142,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -468,8 +468,11 @@ export class PetService {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -199,8 +199,11 @@ export class StoreService {
|
||||
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -358,8 +358,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -142,8 +142,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -358,8 +358,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -142,8 +142,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -360,8 +360,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -144,8 +144,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -360,8 +360,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -144,8 +144,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -358,8 +358,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -142,8 +142,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -358,8 +358,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -142,8 +142,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -360,8 +360,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -144,8 +144,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -360,8 +360,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -144,8 +144,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -402,8 +402,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -157,8 +157,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -360,8 +360,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -144,8 +144,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -360,8 +360,11 @@ export class PetService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
@@ -144,8 +144,11 @@ export class StoreService {
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKeys && this.configuration.apiKeys["api_key"]) {
|
||||
headers = headers.set('api_key', this.configuration.apiKeys["api_key"]);
|
||||
if (this.configuration.apiKeys) {
|
||||
const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"];
|
||||
if (key) {
|
||||
headers = headers.set('api_key', key);
|
||||
}
|
||||
}
|
||||
|
||||
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
||||
|
||||
Reference in New Issue
Block a user