diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache
index debe4c15a54..81723479952 100644
--- a/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache
+++ b/modules/swagger-codegen/src/main/resources/typescript-angular/api.service.mustache
@@ -204,7 +204,7 @@ export class {{classname}} {
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
{{/produces}}
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
{{^useHttpClient}}
headers.set("Accept", httpHeaderAcceptSelected);
@@ -221,7 +221,7 @@ export class {{classname}} {
{{/consumes}}
];
{{#bodyParam}}
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
{{^useHttpClient}}
headers.set('Content-Type', httpContentTypeSelected);
diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular/configuration.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular/configuration.mustache
index d486fc9f97d..2ee1824f5f7 100644
--- a/modules/swagger-codegen/src/main/resources/typescript-angular/configuration.mustache
+++ b/modules/swagger-codegen/src/main/resources/typescript-angular/configuration.mustache
@@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderContentType (contentTypes: string[]): string {
+ public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) {
return undefined;
}
@@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderAccept(accepts: string[]): string {
+ public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) {
return undefined;
}
diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts
index 4435de468a2..24a32f0c3b0 100644
--- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts
@@ -217,7 +217,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -227,7 +227,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -275,7 +275,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -327,7 +327,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -380,7 +380,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -425,7 +425,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -472,7 +472,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -482,7 +482,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -528,7 +528,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -600,7 +600,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts
index 3eb043313ff..6b3914e7125 100644
--- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts
@@ -138,7 +138,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -177,7 +177,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -216,7 +216,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -255,7 +255,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -263,7 +263,7 @@ export class StoreService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts
index 7fd15126b81..a951e64a84d 100644
--- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts
@@ -204,7 +204,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -212,7 +212,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -248,7 +248,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -256,7 +256,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -292,7 +292,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -300,7 +300,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -336,7 +336,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -375,7 +375,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -426,7 +426,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -462,7 +462,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -505,7 +505,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -513,7 +513,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/default/configuration.ts b/samples/client/petstore/typescript-angular-v2/default/configuration.ts
index d486fc9f97d..2ee1824f5f7 100644
--- a/samples/client/petstore/typescript-angular-v2/default/configuration.ts
+++ b/samples/client/petstore/typescript-angular-v2/default/configuration.ts
@@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderContentType (contentTypes: string[]): string {
+ public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) {
return undefined;
}
@@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderAccept(accepts: string[]): string {
+ public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) {
return undefined;
}
diff --git a/samples/client/petstore/typescript-angular-v2/default/git_push.sh b/samples/client/petstore/typescript-angular-v2/default/git_push.sh
index ed374619b13..ae01b182ae9 100644
--- a/samples/client/petstore/typescript-angular-v2/default/git_push.sh
+++ b/samples/client/petstore/typescript-angular-v2/default/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts
index 4435de468a2..24a32f0c3b0 100644
--- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts
@@ -217,7 +217,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -227,7 +227,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -275,7 +275,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -327,7 +327,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -380,7 +380,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -425,7 +425,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -472,7 +472,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -482,7 +482,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -528,7 +528,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -600,7 +600,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts
index 3eb043313ff..6b3914e7125 100644
--- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts
@@ -138,7 +138,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -177,7 +177,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -216,7 +216,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -255,7 +255,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -263,7 +263,7 @@ export class StoreService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts
index 7fd15126b81..a951e64a84d 100644
--- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts
@@ -204,7 +204,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -212,7 +212,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -248,7 +248,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -256,7 +256,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -292,7 +292,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -300,7 +300,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -336,7 +336,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -375,7 +375,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -426,7 +426,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -462,7 +462,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -505,7 +505,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -513,7 +513,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/npm/configuration.ts b/samples/client/petstore/typescript-angular-v2/npm/configuration.ts
index d486fc9f97d..2ee1824f5f7 100644
--- a/samples/client/petstore/typescript-angular-v2/npm/configuration.ts
+++ b/samples/client/petstore/typescript-angular-v2/npm/configuration.ts
@@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderContentType (contentTypes: string[]): string {
+ public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) {
return undefined;
}
@@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderAccept(accepts: string[]): string {
+ public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) {
return undefined;
}
diff --git a/samples/client/petstore/typescript-angular-v2/npm/git_push.sh b/samples/client/petstore/typescript-angular-v2/npm/git_push.sh
index ed374619b13..ae01b182ae9 100644
--- a/samples/client/petstore/typescript-angular-v2/npm/git_push.sh
+++ b/samples/client/petstore/typescript-angular-v2/npm/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts
index 8f606901d00..4d4f9321745 100644
--- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts
@@ -218,7 +218,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -228,7 +228,7 @@ export class PetService implements PetServiceInterface {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -276,7 +276,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -328,7 +328,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -381,7 +381,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -426,7 +426,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -473,7 +473,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -483,7 +483,7 @@ export class PetService implements PetServiceInterface {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -529,7 +529,7 @@ export class PetService implements PetServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -601,7 +601,7 @@ export class PetService implements PetServiceInterface {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts
index 30d37ccf381..fa02068e811 100644
--- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts
@@ -139,7 +139,7 @@ export class StoreService implements StoreServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -178,7 +178,7 @@ export class StoreService implements StoreServiceInterface {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -217,7 +217,7 @@ export class StoreService implements StoreServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -256,7 +256,7 @@ export class StoreService implements StoreServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -264,7 +264,7 @@ export class StoreService implements StoreServiceInterface {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts
index 17b1d6311bd..e8455496cfa 100644
--- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts
+++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts
@@ -205,7 +205,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -213,7 +213,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -249,7 +249,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -257,7 +257,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -293,7 +293,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -301,7 +301,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -337,7 +337,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -376,7 +376,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -427,7 +427,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -463,7 +463,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -506,7 +506,7 @@ export class UserService implements UserServiceInterface {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -514,7 +514,7 @@ export class UserService implements UserServiceInterface {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts
index d486fc9f97d..2ee1824f5f7 100644
--- a/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts
+++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts
@@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderContentType (contentTypes: string[]): string {
+ public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) {
return undefined;
}
@@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderAccept(accepts: string[]): string {
+ public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) {
return undefined;
}
diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh b/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh
index ed374619b13..ae01b182ae9 100644
--- a/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh
+++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/package.json b/samples/client/petstore/typescript-angular-v2/with-interfaces/package.json
index d6aee04c589..0e363919a9b 100644
--- a/samples/client/petstore/typescript-angular-v2/with-interfaces/package.json
+++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/package.json
@@ -35,6 +35,6 @@
"typescript": "^2.1.5"
},
"publishConfig": {
- "registry":"https://skimdb.npmjs.com/registry"
+ "registry": "https://skimdb.npmjs.com/registry"
}
}
diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts
index e6dbfc38628..467ad5529bc 100644
--- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts
+++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts
@@ -82,7 +82,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -92,7 +92,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
@@ -135,7 +135,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -182,7 +182,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -230,7 +230,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -270,7 +270,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -312,7 +312,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -322,7 +322,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
@@ -363,7 +363,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -426,7 +426,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts
index e381873818a..74e035bc575 100644
--- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts
+++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts
@@ -73,7 +73,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -107,7 +107,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -141,7 +141,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -175,7 +175,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -183,7 +183,7 @@ export class StoreService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts
index 55fb2bb500b..9c60e1f8c19 100644
--- a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts
+++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts
@@ -73,7 +73,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -81,7 +81,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
@@ -112,7 +112,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -120,7 +120,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
@@ -151,7 +151,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -159,7 +159,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
@@ -190,7 +190,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -224,7 +224,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -270,7 +270,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -301,7 +301,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -339,7 +339,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -347,7 +347,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set("Content-Type", httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts b/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts
index d486fc9f97d..2ee1824f5f7 100644
--- a/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts
+++ b/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts
@@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderContentType (contentTypes: string[]): string {
+ public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) {
return undefined;
}
@@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderAccept(accepts: string[]): string {
+ public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) {
return undefined;
}
diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh b/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh
index ed374619b13..ae01b182ae9 100644
--- a/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh
+++ b/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts
index 4435de468a2..24a32f0c3b0 100644
--- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts
+++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts
@@ -217,7 +217,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -227,7 +227,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -275,7 +275,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -327,7 +327,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -380,7 +380,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -425,7 +425,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -472,7 +472,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -482,7 +482,7 @@ export class PetService {
'application/json',
'application/xml'
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -528,7 +528,7 @@ export class PetService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -600,7 +600,7 @@ export class PetService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts
index 3eb043313ff..6b3914e7125 100644
--- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts
+++ b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts
@@ -138,7 +138,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -177,7 +177,7 @@ export class StoreService {
let httpHeaderAccepts: string[] = [
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -216,7 +216,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -255,7 +255,7 @@ export class StoreService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -263,7 +263,7 @@ export class StoreService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts
index 7fd15126b81..a951e64a84d 100644
--- a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts
+++ b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts
@@ -204,7 +204,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -212,7 +212,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -248,7 +248,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -256,7 +256,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -292,7 +292,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -300,7 +300,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
@@ -336,7 +336,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -375,7 +375,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -426,7 +426,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -462,7 +462,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -505,7 +505,7 @@ export class UserService {
'application/xml',
'application/json'
];
- let httpHeaderAcceptSelected: string = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers.set("Accept", httpHeaderAcceptSelected);
}
@@ -513,7 +513,7 @@ export class UserService {
// to determine the Content-Type header
let consumes: string[] = [
];
- let httpContentTypeSelected:string = this.configuration.selectHeaderContentType(consumes);
+ let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers.set('Content-Type', httpContentTypeSelected);
}
diff --git a/samples/client/petstore/typescript-angular-v4/npm/configuration.ts b/samples/client/petstore/typescript-angular-v4/npm/configuration.ts
index d486fc9f97d..2ee1824f5f7 100644
--- a/samples/client/petstore/typescript-angular-v4/npm/configuration.ts
+++ b/samples/client/petstore/typescript-angular-v4/npm/configuration.ts
@@ -31,7 +31,7 @@ export class Configuration {
* @param {string[]} contentTypes - the array of content types that are available for selection
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderContentType (contentTypes: string[]): string {
+ public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length == 0) {
return undefined;
}
@@ -50,7 +50,7 @@ export class Configuration {
* @param {string[]} accepts - the array of content types that are available for selection.
* @returns {string} the selected content-type or undefined
if no selection could be made.
*/
- public selectHeaderAccept(accepts: string[]): string {
+ public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length == 0) {
return undefined;
}
diff --git a/samples/client/petstore/typescript-angular-v4/npm/git_push.sh b/samples/client/petstore/typescript-angular-v4/npm/git_push.sh
index ed374619b13..ae01b182ae9 100644
--- a/samples/client/petstore/typescript-angular-v4/npm/git_push.sh
+++ b/samples/client/petstore/typescript-angular-v4/npm/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git