forked from loafle/openapi-generator-original
[typescript-angular] strict type checking (#218)
* strict type checking * strict type checking * generate samples for angular-typescript
This commit is contained in:
committed by
William Cheng
parent
2392a09eeb
commit
0a479f77f6
@@ -226,7 +226,7 @@ export class {{classname}} {
|
||||
{{/produces}}
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
{{^useHttpClient}}
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
{{/useHttpClient}}
|
||||
@@ -243,7 +243,7 @@ export class {{classname}} {
|
||||
];
|
||||
{{#bodyParam}}
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
{{^useHttpClient}}
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
{{/useHttpClient}}
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -217,7 +217,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ export class StoreService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ export class StoreService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -217,7 +217,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ export class StoreService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ export class StoreService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -218,7 +218,7 @@ export class PetService implements PetServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ export class PetService implements PetServiceInterface {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ export class PetService implements PetServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ export class PetService implements PetServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ export class PetService implements PetServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ export class PetService implements PetServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ export class PetService implements PetServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ export class PetService implements PetServiceInterface {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ export class PetService implements PetServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ export class PetService implements PetServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ export class StoreService implements StoreServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ export class StoreService implements StoreServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ export class StoreService implements StoreServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ export class StoreService implements StoreServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ export class StoreService implements StoreServiceInterface {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ export class UserService implements UserServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ export class UserService implements UserServiceInterface {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ export class UserService implements UserServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ export class UserService implements UserServiceInterface {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ export class UserService implements UserServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ export class UserService implements UserServiceInterface {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ export class UserService implements UserServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ export class UserService implements UserServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ export class UserService implements UserServiceInterface {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ export class UserService implements UserServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@ export class UserService implements UserServiceInterface {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ export class UserService implements UserServiceInterface {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -86,7 +86,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export class StoreService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ export class StoreService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -217,7 +217,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ export class StoreService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ export class StoreService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -86,7 +86,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export class StoreService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ export class StoreService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.0.1-SNAPSHOT
|
||||
@@ -88,7 +88,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ export class PetService {
|
||||
'application/xml'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ export class PetService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ export class PetService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ export class StoreService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ export class StoreService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ export class StoreService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ export class UserService {
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ export class UserService {
|
||||
let httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ export class UserService {
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class Configuration {
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class Configuration {
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user