diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java index 8ad64c74c28..f83a36be6eb 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java @@ -31,12 +31,14 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod public static final String SNAPSHOT = "snapshot"; public static final String USE_OPAQUE_TOKEN = "useOpaqueToken"; public static final String INJECTION_TOKEN = "injectionToken"; + public static final String INJECTION_TOKEN_IMPORT = "injectionTokenImport"; public static final String WITH_INTERFACES = "withInterfaces"; protected String npmName = null; protected String npmVersion = "1.0.0"; protected String npmRepository = null; protected String injectionToken = "InjectionToken"; + protected String injectionTokenImport = "InjectionToken"; public TypeScriptAngular2ClientCodegen() { super(); @@ -96,6 +98,7 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod this.setOpaqueToken(); } additionalProperties.put(INJECTION_TOKEN, this.injectionToken); + additionalProperties.put(INJECTION_TOKEN_IMPORT, this.injectionTokenImport); if(additionalProperties.containsKey(WITH_INTERFACES)) { boolean withInterfaces = Boolean.parseBoolean(additionalProperties.get(WITH_INTERFACES).toString()); @@ -340,5 +343,6 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod public void setOpaqueToken() { this.injectionToken = "OpaqueToken"; + this.injectionTokenImport = "OpaqueToken"; } } diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/variables.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/variables.mustache index d1632d5a272..9cd21eb9984 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/variables.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/variables.mustache @@ -1,4 +1,4 @@ -import { {{{injectionToken}}} } from '@angular/core'; +import { {{{injectionTokenImport}}} } from '@angular/core'; export const BASE_PATH = new {{{injectionToken}}}('basePath'); export const COLLECTION_FORMATS = { diff --git a/samples/client/petstore/typescript-angular2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular2/default/api/pet.service.ts index 0303ca70d3a..e8f290f135d 100644 --- a/samples/client/petstore/typescript-angular2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular2/default/api/pet.service.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -20,7 +20,6 @@ import { Response, ResponseContentType } from '@angular/http import { Observable } from 'rxjs/Observable'; import '../rxjs-operators'; -import { ApiResponse } from '../model/apiResponse'; import { Pet } from '../model/pet'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -78,7 +77,7 @@ export class PetService { * * @param body Pet object that needs to be added to the store */ - public addPet(body: Pet, extraHttpRequestParams?: any): Observable<{}> { + public addPet(body?: Pet, extraHttpRequestParams?: any): Observable<{}> { return this.addPetWithHttpInfo(body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -111,7 +110,7 @@ export class PetService { * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter */ - public findPetsByStatus(status: Array, extraHttpRequestParams?: any): Observable> { + public findPetsByStatus(status?: Array, extraHttpRequestParams?: any): Observable> { return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -127,7 +126,7 @@ export class PetService { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by */ - public findPetsByTags(tags: Array, extraHttpRequestParams?: any): Observable> { + public findPetsByTags(tags?: Array, extraHttpRequestParams?: any): Observable> { return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -140,8 +139,8 @@ export class PetService { /** * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @param petId ID of pet that needs to be fetched */ public getPetById(petId: number, extraHttpRequestParams?: any): Observable { return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams) @@ -159,7 +158,7 @@ export class PetService { * * @param body Pet object that needs to be added to the store */ - public updatePet(body: Pet, extraHttpRequestParams?: any): Observable<{}> { + public updatePet(body?: Pet, extraHttpRequestParams?: any): Observable<{}> { return this.updatePetWithHttpInfo(body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -177,7 +176,7 @@ export class PetService { * @param name Updated name of the pet * @param status Updated status of the pet */ - public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> { + public updatePetWithForm(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> { return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -195,7 +194,7 @@ export class PetService { * @param additionalMetadata Additional data to pass to server * @param file file to upload */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable { + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<{}> { return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -212,21 +211,17 @@ export class PetService { * * @param body Pet object that needs to be added to the store */ - public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: any): Observable { + public addPetWithHttpInfo(body?: Pet, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required @@ -280,8 +275,8 @@ export class PetService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required @@ -313,25 +308,23 @@ export class PetService { * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter */ - public findPetsByStatusWithHttpInfo(status: Array, extraHttpRequestParams?: any): Observable { + public findPetsByStatusWithHttpInfo(status?: Array, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/findByStatus'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'status' is not null or undefined - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); - } if (status) { - queryParameters.set('status', status.join(COLLECTION_FORMATS['csv'])); + status.forEach((element) => { + queryParameters.append('status', element); + }) } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required @@ -363,25 +356,23 @@ export class PetService { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by */ - public findPetsByTagsWithHttpInfo(tags: Array, extraHttpRequestParams?: any): Observable { + public findPetsByTagsWithHttpInfo(tags?: Array, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/findByTags'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'tags' is not null or undefined - if (tags === null || tags === undefined) { - throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); - } if (tags) { - queryParameters.set('tags', tags.join(COLLECTION_FORMATS['csv'])); + tags.forEach((element) => { + queryParameters.append('tags', element); + }) } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required @@ -410,8 +401,8 @@ export class PetService { /** * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @param petId ID of pet that needs to be fetched */ public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' @@ -427,8 +418,8 @@ export class PetService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (api_key) required @@ -436,6 +427,15 @@ export class PetService { headers.set('api_key', this.configuration.apiKeys["api_key"]); } + // authentication (petstore_auth) required + // oauth required + if (this.configuration.accessToken) { + let accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers.set('Authorization', 'Bearer ' + accessToken); + } + let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, @@ -456,21 +456,17 @@ export class PetService { * * @param body Pet object that needs to be added to the store */ - public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: any): Observable { + public updatePetWithHttpInfo(body?: Pet, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required @@ -507,7 +503,7 @@ export class PetService { * @param name Updated name of the pet * @param status Updated status of the pet */ - public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable { + public updatePetWithFormWithHttpInfo(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/pet/${petId}' .replace('${' + 'petId' + '}', String(petId)); @@ -530,8 +526,8 @@ export class PetService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required @@ -598,7 +594,8 @@ export class PetService { // to determine the Accept header let produces: string[] = [ - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (petstore_auth) required diff --git a/samples/client/petstore/typescript-angular2/default/api/store.service.ts b/samples/client/petstore/typescript-angular2/default/api/store.service.ts index 877c8df7e08..937130527af 100644 --- a/samples/client/petstore/typescript-angular2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular2/default/api/store.service.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -108,7 +108,7 @@ export class StoreService { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched */ - public getOrderById(orderId: number, extraHttpRequestParams?: any): Observable { + public getOrderById(orderId: string, extraHttpRequestParams?: any): Observable { return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -124,7 +124,7 @@ export class StoreService { * * @param body order placed for purchasing the pet */ - public placeOrder(body: Order, extraHttpRequestParams?: any): Observable { + public placeOrder(body?: Order, extraHttpRequestParams?: any): Observable { return this.placeOrderWithHttpInfo(body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -155,8 +155,8 @@ export class StoreService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -187,7 +187,8 @@ export class StoreService { // to determine the Accept header let produces: string[] = [ - 'application/json' + 'application/json', + 'application/xml' ]; // authentication (api_key) required @@ -215,7 +216,7 @@ export class StoreService { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched */ - public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable { + public getOrderByIdWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order/${orderId}' .replace('${' + 'orderId' + '}', String(orderId)); @@ -229,8 +230,8 @@ export class StoreService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -253,21 +254,17 @@ export class StoreService { * * @param body order placed for purchasing the pet */ - public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: any): Observable { + public placeOrderWithHttpInfo(body?: Order, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/store/order'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; diff --git a/samples/client/petstore/typescript-angular2/default/api/user.service.ts b/samples/client/petstore/typescript-angular2/default/api/user.service.ts index 5a5761dcdd3..a9d12993aff 100644 --- a/samples/client/petstore/typescript-angular2/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular2/default/api/user.service.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -77,7 +77,7 @@ export class UserService { * This can only be done by the logged in user. * @param body Created user object */ - public createUser(body: User, extraHttpRequestParams?: any): Observable<{}> { + public createUser(body?: User, extraHttpRequestParams?: any): Observable<{}> { return this.createUserWithHttpInfo(body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -93,7 +93,7 @@ export class UserService { * * @param body List of user object */ - public createUsersWithArrayInput(body: Array, extraHttpRequestParams?: any): Observable<{}> { + public createUsersWithArrayInput(body?: Array, extraHttpRequestParams?: any): Observable<{}> { return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -109,7 +109,7 @@ export class UserService { * * @param body List of user object */ - public createUsersWithListInput(body: Array, extraHttpRequestParams?: any): Observable<{}> { + public createUsersWithListInput(body?: Array, extraHttpRequestParams?: any): Observable<{}> { return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -158,7 +158,7 @@ export class UserService { * @param username The user name for login * @param password The password for login in clear text */ - public loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable { + public loginUser(username?: string, password?: string, extraHttpRequestParams?: any): Observable { return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -190,7 +190,7 @@ export class UserService { * @param username name that need to be deleted * @param body Updated user object */ - public updateUser(username: string, body: User, extraHttpRequestParams?: any): Observable<{}> { + public updateUser(username: string, body?: User, extraHttpRequestParams?: any): Observable<{}> { return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams) .map((response: Response) => { if (response.status === 204) { @@ -207,21 +207,17 @@ export class UserService { * This can only be done by the logged in user. * @param body Created user object */ - public createUserWithHttpInfo(body: User, extraHttpRequestParams?: any): Observable { + public createUserWithHttpInfo(body?: User, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -247,21 +243,17 @@ export class UserService { * * @param body List of user object */ - public createUsersWithArrayInputWithHttpInfo(body: Array, extraHttpRequestParams?: any): Observable { + public createUsersWithArrayInputWithHttpInfo(body?: Array, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/createWithArray'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -287,21 +279,17 @@ export class UserService { * * @param body List of user object */ - public createUsersWithListInputWithHttpInfo(body: Array, extraHttpRequestParams?: any): Observable { + public createUsersWithListInputWithHttpInfo(body?: Array, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/createWithList'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -341,8 +329,8 @@ export class UserService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -379,8 +367,8 @@ export class UserService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -404,20 +392,12 @@ export class UserService { * @param username The user name for login * @param password The password for login in clear text */ - public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: any): Observable { + public loginUserWithHttpInfo(username?: string, password?: string, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/login'; let queryParameters = new URLSearchParams(); let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - // verify required parameter 'username' is not null or undefined - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling loginUser.'); - } - // verify required parameter 'password' is not null or undefined - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling loginUser.'); - } if (username !== undefined) { queryParameters.set('username', username); } @@ -429,8 +409,8 @@ export class UserService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -461,8 +441,8 @@ export class UserService { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; @@ -486,7 +466,7 @@ export class UserService { * @param username name that need to be deleted * @param body Updated user object */ - public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: any): Observable { + public updateUserWithHttpInfo(username: string, body?: User, extraHttpRequestParams?: any): Observable { const path = this.basePath + '/user/${username}' .replace('${' + 'username' + '}', String(username)); @@ -497,15 +477,11 @@ export class UserService { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); - } // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' + 'application/json', + 'application/xml' ]; diff --git a/samples/client/petstore/typescript-angular2/default/model/category.ts b/samples/client/petstore/typescript-angular2/default/model/category.ts index d09f8d7b265..202faef0d43 100644 --- a/samples/client/petstore/typescript-angular2/default/model/category.ts +++ b/samples/client/petstore/typescript-angular2/default/model/category.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -12,9 +12,6 @@ -/** - * A category for a pet - */ export interface Category { id?: number; diff --git a/samples/client/petstore/typescript-angular2/default/model/models.ts b/samples/client/petstore/typescript-angular2/default/model/models.ts index 8607c5dabd0..1f152369d80 100644 --- a/samples/client/petstore/typescript-angular2/default/model/models.ts +++ b/samples/client/petstore/typescript-angular2/default/model/models.ts @@ -1,4 +1,3 @@ -export * from './apiResponse'; export * from './category'; export * from './order'; export * from './pet'; diff --git a/samples/client/petstore/typescript-angular2/default/model/order.ts b/samples/client/petstore/typescript-angular2/default/model/order.ts index 402a86689c8..7e2cb037074 100644 --- a/samples/client/petstore/typescript-angular2/default/model/order.ts +++ b/samples/client/petstore/typescript-angular2/default/model/order.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -12,9 +12,6 @@ -/** - * An order for a pets from the pet store - */ export interface Order { id?: number; diff --git a/samples/client/petstore/typescript-angular2/default/model/pet.ts b/samples/client/petstore/typescript-angular2/default/model/pet.ts index 0d6137d02cf..7a429abf483 100644 --- a/samples/client/petstore/typescript-angular2/default/model/pet.ts +++ b/samples/client/petstore/typescript-angular2/default/model/pet.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -14,9 +14,6 @@ import { Category } from './category'; import { Tag } from './tag'; -/** - * A pet for sale in the pet store - */ export interface Pet { id?: number; diff --git a/samples/client/petstore/typescript-angular2/default/model/tag.ts b/samples/client/petstore/typescript-angular2/default/model/tag.ts index 3ed1eeff8f3..56cbe04b7a3 100644 --- a/samples/client/petstore/typescript-angular2/default/model/tag.ts +++ b/samples/client/petstore/typescript-angular2/default/model/tag.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -12,9 +12,6 @@ -/** - * A tag for a pet - */ export interface Tag { id?: number; diff --git a/samples/client/petstore/typescript-angular2/default/model/user.ts b/samples/client/petstore/typescript-angular2/default/model/user.ts index f4914ae2608..202adb58c73 100644 --- a/samples/client/petstore/typescript-angular2/default/model/user.ts +++ b/samples/client/petstore/typescript-angular2/default/model/user.ts @@ -1,9 +1,9 @@ /** * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * Contact: apiteam@wordnik.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -12,9 +12,6 @@ -/** - * A User who is purchasing from the pet store - */ export interface User { id?: number; diff --git a/samples/client/petstore/typescript-angular2/default/variables.ts b/samples/client/petstore/typescript-angular2/default/variables.ts index d06561e7dac..7ef7e51c24f 100644 --- a/samples/client/petstore/typescript-angular2/default/variables.ts +++ b/samples/client/petstore/typescript-angular2/default/variables.ts @@ -1,4 +1,4 @@ -import { InjectionToken } from '@angular/core'; +import { InjectionToken } from '@angular/core'; export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { @@ -6,4 +6,4 @@ export const COLLECTION_FORMATS = { 'tsv': ' ', 'ssv': ' ', 'pipes': '|' -} +} \ No newline at end of file