[TypeScript][Angular] fix problem with strict compilation (#6978)

* fix probelme with strict compilation

* commit generated files
This commit is contained in:
topce 2017-11-20 18:21:45 +01:00 committed by William Cheng
parent 404b526dbe
commit 04ee374328
28 changed files with 155 additions and 155 deletions

View File

@ -204,7 +204,7 @@ export class {{classname}} {
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}} '{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
{{/produces}} {{/produces}}
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
{{^useHttpClient}} {{^useHttpClient}}
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
@ -221,7 +221,7 @@ export class {{classname}} {
{{/consumes}} {{/consumes}}
]; ];
{{#bodyParam}} {{#bodyParam}}
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
{{^useHttpClient}} {{^useHttpClient}}
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);

View File

@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection * @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType (contentTypes: string[]): string { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) { if (contentTypes.length == 0) {
return undefined; return undefined;
} }
@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection. * @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderAccept(accepts: string[]): string { public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) { if (accepts.length == 0) {
return undefined; return undefined;
} }

View File

@ -217,7 +217,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -227,7 +227,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -275,7 +275,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -327,7 +327,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -380,7 +380,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -425,7 +425,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -472,7 +472,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -482,7 +482,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -528,7 +528,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -600,7 +600,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }

View File

@ -138,7 +138,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -177,7 +177,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -216,7 +216,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -255,7 +255,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -263,7 +263,7 @@ export class StoreService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -204,7 +204,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -212,7 +212,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -248,7 +248,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -256,7 +256,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -292,7 +292,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -300,7 +300,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -336,7 +336,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -375,7 +375,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -426,7 +426,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -462,7 +462,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -505,7 +505,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -513,7 +513,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection * @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType (contentTypes: string[]): string { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) { if (contentTypes.length == 0) {
return undefined; return undefined;
} }
@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection. * @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderAccept(accepts: string[]): string { public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) { if (accepts.length == 0) {
return undefined; return undefined;
} }

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -217,7 +217,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -227,7 +227,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -275,7 +275,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -327,7 +327,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -380,7 +380,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -425,7 +425,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -472,7 +472,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -482,7 +482,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -528,7 +528,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -600,7 +600,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }

View File

@ -138,7 +138,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -177,7 +177,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -216,7 +216,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -255,7 +255,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -263,7 +263,7 @@ export class StoreService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -204,7 +204,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -212,7 +212,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -248,7 +248,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -256,7 +256,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -292,7 +292,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -300,7 +300,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -336,7 +336,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -375,7 +375,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -426,7 +426,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -462,7 +462,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -505,7 +505,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -513,7 +513,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection * @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType (contentTypes: string[]): string { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) { if (contentTypes.length == 0) {
return undefined; return undefined;
} }
@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection. * @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderAccept(accepts: string[]): string { public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) { if (accepts.length == 0) {
return undefined; return undefined;
} }

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -218,7 +218,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -228,7 +228,7 @@ export class PetService implements PetServiceInterface {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -276,7 +276,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -328,7 +328,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -381,7 +381,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -426,7 +426,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -473,7 +473,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -483,7 +483,7 @@ export class PetService implements PetServiceInterface {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -529,7 +529,7 @@ export class PetService implements PetServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -601,7 +601,7 @@ export class PetService implements PetServiceInterface {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }

View File

@ -139,7 +139,7 @@ export class StoreService implements StoreServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -178,7 +178,7 @@ export class StoreService implements StoreServiceInterface {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -217,7 +217,7 @@ export class StoreService implements StoreServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -256,7 +256,7 @@ export class StoreService implements StoreServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -264,7 +264,7 @@ export class StoreService implements StoreServiceInterface {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -205,7 +205,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -213,7 +213,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -249,7 +249,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -257,7 +257,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -293,7 +293,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -301,7 +301,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -337,7 +337,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -376,7 +376,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -427,7 +427,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -463,7 +463,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -506,7 +506,7 @@ export class UserService implements UserServiceInterface {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -514,7 +514,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection * @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType (contentTypes: string[]): string { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) { if (contentTypes.length == 0) {
return undefined; return undefined;
} }
@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection. * @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderAccept(accepts: string[]): string { public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) { if (accepts.length == 0) {
return undefined; return undefined;
} }

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -82,7 +82,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -92,7 +92,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }
@ -135,7 +135,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -182,7 +182,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -230,7 +230,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -270,7 +270,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -312,7 +312,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -322,7 +322,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }
@ -363,7 +363,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -426,7 +426,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }

View File

@ -73,7 +73,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -107,7 +107,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -141,7 +141,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -175,7 +175,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -183,7 +183,7 @@ export class StoreService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }

View File

@ -73,7 +73,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -81,7 +81,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }
@ -112,7 +112,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -120,7 +120,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }
@ -151,7 +151,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -159,7 +159,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }
@ -190,7 +190,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -224,7 +224,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -270,7 +270,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -301,7 +301,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -339,7 +339,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected); headers = headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -347,7 +347,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected); headers = headers.set("Content-Type", httpContentTypeSelected);
} }

View File

@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection * @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType (contentTypes: string[]): string { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) { if (contentTypes.length == 0) {
return undefined; return undefined;
} }
@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection. * @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderAccept(accepts: string[]): string { public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) { if (accepts.length == 0) {
return undefined; return undefined;
} }

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -217,7 +217,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -227,7 +227,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -275,7 +275,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -327,7 +327,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -380,7 +380,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -425,7 +425,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -472,7 +472,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -482,7 +482,7 @@ export class PetService {
'application/json', 'application/json',
'application/xml' 'application/xml'
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -528,7 +528,7 @@ export class PetService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -600,7 +600,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }

View File

@ -138,7 +138,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -177,7 +177,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [ let httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -216,7 +216,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -255,7 +255,7 @@ export class StoreService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -263,7 +263,7 @@ export class StoreService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -204,7 +204,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -212,7 +212,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -248,7 +248,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -256,7 +256,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -292,7 +292,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -300,7 +300,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }
@ -336,7 +336,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -375,7 +375,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -426,7 +426,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -462,7 +462,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -505,7 +505,7 @@ export class UserService {
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts); let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) { if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected); headers.set("Accept", httpHeaderAcceptSelected);
} }
@ -513,7 +513,7 @@ export class UserService {
// to determine the Content-Type header // to determine the Content-Type header
let consumes: string[] = [ let consumes: string[] = [
]; ];
let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes); let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) { if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected); headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection * @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType (contentTypes: string[]): string { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) { if (contentTypes.length == 0) {
return undefined; return undefined;
} }
@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection. * @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made. * @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderAccept(accepts: string[]): string { public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) { if (accepts.length == 0) {
return undefined; return undefined;
} }

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git