From 95a8192c2579048da1ae2ecddfcfa0af5c0ba1bc Mon Sep 17 00:00:00 2001 From: Johannes Herrnegger Date: Sat, 4 Feb 2017 06:00:26 +0100 Subject: [PATCH] [Typescript-Angular2] Fixes #4703 (#4704) * fix issue #4703 * run petstore --- .../typescript-angular2/api.mustache | 8 ++-- .../typescript-angular2/default/api/PetApi.ts | 48 +++++++++---------- .../default/api/StoreApi.ts | 24 +++++----- .../default/api/UserApi.ts | 48 +++++++++---------- .../typescript-angular2/npm/README.md | 4 +- .../typescript-angular2/npm/api/PetApi.ts | 48 +++++++++---------- .../typescript-angular2/npm/api/StoreApi.ts | 24 +++++----- .../typescript-angular2/npm/api/UserApi.ts | 48 +++++++++---------- .../typescript-angular2/npm/package.json | 2 +- 9 files changed, 127 insertions(+), 127 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache index 1784737a849..022840dae3d 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache @@ -125,7 +125,7 @@ export class {{classname}} { '{{{mediaType}}}'{{#hasMore}}, {{/hasMore}} {{/produces}} ]; - + {{#authMethods}} // authentication ({{name}}) required {{#isApiKey}} @@ -137,7 +137,7 @@ export class {{classname}} { {{/isKeyInHeader}} {{#isKeyInQuery}} if (this.configuration.apiKey) { - formParams.set('{{keyParamName}}', this.configuration.apiKey); + queryParameters.set('{{keyParamName}}', this.configuration.apiKey); } {{/isKeyInQuery}} @@ -199,7 +199,7 @@ export class {{classname}} { {{/hasFormParams}} search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -207,7 +207,7 @@ export class {{classname}} { return this.http.request(path, requestOptions); } - + {{/operation}} } {{/operations}} diff --git a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts index 6989fd1629f..9806c35339c 100644 --- a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts @@ -195,7 +195,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -213,7 +213,7 @@ export class PetApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -221,7 +221,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Deletes a pet * @@ -248,7 +248,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -263,7 +263,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -271,7 +271,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -297,7 +297,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -312,7 +312,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -320,7 +320,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -346,7 +346,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -361,7 +361,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -369,7 +369,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Find pet by ID * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions @@ -393,7 +393,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -413,7 +413,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -421,7 +421,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Update an existing pet * @@ -443,7 +443,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -461,7 +461,7 @@ export class PetApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -469,7 +469,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Updates a pet in the store with form data * @@ -498,7 +498,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -524,7 +524,7 @@ export class PetApi { body: formParams.toString(), search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -532,7 +532,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * uploads an image * @@ -561,7 +561,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -587,7 +587,7 @@ export class PetApi { body: formParams.toString(), search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -595,5 +595,5 @@ export class PetApi { return this.http.request(path, requestOptions); } - + } diff --git a/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts index e44e80b70f8..744e5333386 100644 --- a/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts @@ -127,13 +127,13 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -141,7 +141,7 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -160,7 +160,7 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + // authentication (api_key) required if (this.configuration.apiKey) { headers.set('api_key', this.configuration.apiKey); @@ -171,7 +171,7 @@ export class StoreApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -179,7 +179,7 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -203,13 +203,13 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -217,7 +217,7 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + /** * Place an order for a pet * @@ -237,7 +237,7 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -246,7 +246,7 @@ export class StoreApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -254,5 +254,5 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + } diff --git a/samples/client/petstore/typescript-angular2/default/api/UserApi.ts b/samples/client/petstore/typescript-angular2/default/api/UserApi.ts index c560bb31f59..2c15efc9ee5 100644 --- a/samples/client/petstore/typescript-angular2/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/UserApi.ts @@ -189,7 +189,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -198,7 +198,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -206,7 +206,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Creates list of users with given input array * @@ -226,7 +226,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -235,7 +235,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -243,7 +243,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Creates list of users with given input array * @@ -263,7 +263,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -272,7 +272,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -280,7 +280,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Delete user * This can only be done by the logged in user. @@ -304,13 +304,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -318,7 +318,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Get user by user name * @@ -342,13 +342,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -356,7 +356,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Logs user into the system * @@ -393,13 +393,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -407,7 +407,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Logs out current logged in user session * @@ -426,13 +426,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -440,7 +440,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Updated user * This can only be done by the logged in user. @@ -465,7 +465,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -474,7 +474,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -482,5 +482,5 @@ export class UserApi { return this.http.request(path, requestOptions); } - + } diff --git a/samples/client/petstore/typescript-angular2/npm/README.md b/samples/client/petstore/typescript-angular2/npm/README.md index 2fc293907be..d5e4636d3c9 100644 --- a/samples/client/petstore/typescript-angular2/npm/README.md +++ b/samples/client/petstore/typescript-angular2/npm/README.md @@ -1,4 +1,4 @@ -## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201701231840 +## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201702031824 ### Building @@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's. _published:_ ``` -npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201701231840 --save +npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201702031824 --save ``` _unPublished (not recommended):_ diff --git a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts index 6989fd1629f..9806c35339c 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts @@ -195,7 +195,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -213,7 +213,7 @@ export class PetApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -221,7 +221,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Deletes a pet * @@ -248,7 +248,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -263,7 +263,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -271,7 +271,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -297,7 +297,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -312,7 +312,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -320,7 +320,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -346,7 +346,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -361,7 +361,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -369,7 +369,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Find pet by ID * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions @@ -393,7 +393,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -413,7 +413,7 @@ export class PetApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -421,7 +421,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Update an existing pet * @@ -443,7 +443,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -461,7 +461,7 @@ export class PetApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -469,7 +469,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * Updates a pet in the store with form data * @@ -498,7 +498,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -524,7 +524,7 @@ export class PetApi { body: formParams.toString(), search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -532,7 +532,7 @@ export class PetApi { return this.http.request(path, requestOptions); } - + /** * uploads an image * @@ -561,7 +561,7 @@ export class PetApi { 'application/json', 'application/xml' ]; - + // authentication (petstore_auth) required // oauth required if (this.configuration.accessToken) { @@ -587,7 +587,7 @@ export class PetApi { body: formParams.toString(), search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -595,5 +595,5 @@ export class PetApi { return this.http.request(path, requestOptions); } - + } diff --git a/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts index e44e80b70f8..744e5333386 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts @@ -127,13 +127,13 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -141,7 +141,7 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -160,7 +160,7 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + // authentication (api_key) required if (this.configuration.apiKey) { headers.set('api_key', this.configuration.apiKey); @@ -171,7 +171,7 @@ export class StoreApi { headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -179,7 +179,7 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -203,13 +203,13 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -217,7 +217,7 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + /** * Place an order for a pet * @@ -237,7 +237,7 @@ export class StoreApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -246,7 +246,7 @@ export class StoreApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -254,5 +254,5 @@ export class StoreApi { return this.http.request(path, requestOptions); } - + } diff --git a/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts b/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts index c560bb31f59..2c15efc9ee5 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts @@ -189,7 +189,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -198,7 +198,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -206,7 +206,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Creates list of users with given input array * @@ -226,7 +226,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -235,7 +235,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -243,7 +243,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Creates list of users with given input array * @@ -263,7 +263,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -272,7 +272,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -280,7 +280,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Delete user * This can only be done by the logged in user. @@ -304,13 +304,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -318,7 +318,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Get user by user name * @@ -342,13 +342,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -356,7 +356,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Logs user into the system * @@ -393,13 +393,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -407,7 +407,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Logs out current logged in user session * @@ -426,13 +426,13 @@ export class UserApi { 'application/json', 'application/xml' ]; - + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -440,7 +440,7 @@ export class UserApi { return this.http.request(path, requestOptions); } - + /** * Updated user * This can only be done by the logged in user. @@ -465,7 +465,7 @@ export class UserApi { 'application/json', 'application/xml' ]; - + headers.set('Content-Type', 'application/json'); let requestOptions: RequestOptionsArgs = new RequestOptions({ @@ -474,7 +474,7 @@ export class UserApi { body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 search: queryParameters }); - + // https://github.com/swagger-api/swagger-codegen/issues/4037 if (extraHttpRequestParams) { requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); @@ -482,5 +482,5 @@ export class UserApi { return this.http.request(path, requestOptions); } - + } diff --git a/samples/client/petstore/typescript-angular2/npm/package.json b/samples/client/petstore/typescript-angular2/npm/package.json index 3aec11a0f42..f0a54da13d5 100644 --- a/samples/client/petstore/typescript-angular2/npm/package.json +++ b/samples/client/petstore/typescript-angular2/npm/package.json @@ -1,6 +1,6 @@ { "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1-SNAPSHOT.201701231840", + "version": "0.0.1-SNAPSHOT.201702031824", "description": "swagger client for @swagger/angular2-typescript-petstore", "author": "Swagger Codegen Contributors", "keywords": [