Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class {{classname}} {
{{/produces}}
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
if (httpHeaderAcceptSelected !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes look good to me.

{{^useHttpClient}}
headers.set('Accept', httpHeaderAcceptSelected);
{{/useHttpClient}}
Expand All @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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');
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.0.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -258,15 +258,15 @@ export class StoreService {
'application/json'
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
if (httpHeaderAcceptSelected !== undefined) {
headers.set('Accept', httpHeaderAcceptSelected);
}

// to determine the Content-Type header
const consumes: string[] = [
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
if (httpContentTypeSelected !== undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ export class UserService {
let httpHeaderAccepts: string[] = [
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
if (httpHeaderAcceptSelected !== undefined) {
headers.set('Accept', httpHeaderAcceptSelected);
}

// to determine the Content-Type header
const consumes: string[] = [
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
if (httpContentTypeSelected !== undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}

Expand Down Expand Up @@ -247,15 +247,15 @@ export class UserService {
let httpHeaderAccepts: string[] = [
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
if (httpHeaderAcceptSelected !== undefined) {
headers.set('Accept', httpHeaderAcceptSelected);
}

// to determine the Content-Type header
const consumes: string[] = [
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
if (httpContentTypeSelected !== undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}

Expand Down Expand Up @@ -290,15 +290,15 @@ export class UserService {
let httpHeaderAccepts: string[] = [
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
if (httpHeaderAcceptSelected !== undefined) {
headers.set('Accept', httpHeaderAcceptSelected);
}

// to determine the Content-Type header
const consumes: string[] = [
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
if (httpContentTypeSelected !== undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -502,15 +502,15 @@ export class UserService {
let httpHeaderAccepts: string[] = [
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
if (httpHeaderAcceptSelected !== undefined) {
headers.set('Accept', httpHeaderAcceptSelected);
}

// to determine the Content-Type header
const consumes: string[] = [
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
if (httpContentTypeSelected !== undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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');
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.0.1-SNAPSHOT
Loading