From ba704e3ac8635d2c35d87fbfb3e0243cf6f35da8 Mon Sep 17 00:00:00 2001 From: wing328 Date: Fri, 14 Jul 2017 13:10:36 +0800 Subject: [PATCH] add @summary tag to ts client (#6052) --- .../resources/TypeScript-Fetch/api.mustache | 48 ++- .../resources/typescript-angular/api.mustache | 10 +- .../typescript-angular2/api.mustache | 2 +- .../resources/typescript-jquery/api.mustache | 6 +- .../resources/typescript-node/api.mustache | 6 +- .../petstore/typescript-angular/api/PetApi.ts | 74 ++-- .../typescript-angular/api/StoreApi.ts | 30 +- .../typescript-angular/api/UserApi.ts | 66 ++-- .../typescript-fetch/builds/default/api.ts | 344 +++++++++--------- .../typescript-fetch/builds/es6-target/api.ts | 344 +++++++++--------- .../builds/with-npm-version/api.ts | 344 +++++++++--------- .../petstore/typescript-jquery/default/api.ts | 46 +-- .../petstore/typescript-jquery/npm/api.ts | 46 +-- .../petstore/typescript-node/default/api.ts | 46 +-- .../petstore/typescript-node/npm/api.ts | 46 +-- 15 files changed, 740 insertions(+), 718 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache b/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache index 77caddbb751..23be9a91356 100644 --- a/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache +++ b/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache @@ -72,10 +72,14 @@ export type {{{enumName}}} = {{#allowableValues}}{{#values}}"{{{.}}}"{{^-last}} */ export const {{classname}}FetchParamCreator = { {{#operation}} - /** {{#summary}} - * {{summary}}{{/summary}}{{#notes}} - * {{notes}}{{/notes}}{{#allParams}} - * @param {{paramName}} {{description}}{{/allParams}} + /** + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} + {{#allParams}} + * @param {{paramName}} {{description}} + {{/allParams}} */ {{nickname}}({{#hasParams}}params: { {{#allParams}} "{{paramName}}"{{^required}}?{{/required}}: {{{dataType}}};{{/allParams}} }, {{/hasParams}}options?: any): FetchArgs { {{#allParams}} @@ -137,10 +141,14 @@ export const {{classname}}FetchParamCreator = { */ export const {{classname}}Fp = { {{#operation}} - /** {{#summary}} - * {{summary}}{{/summary}}{{#notes}} - * {{notes}}{{/notes}}{{#allParams}} - * @param {{paramName}} {{description}}{{/allParams}} + /** + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} + {{#allParams}} + * @param {{paramName}} {{description}} + {{/allParams}} */ {{nickname}}({{#hasParams}}params: { {{#allParams}}"{{paramName}}"{{^required}}?{{/required}}: {{{dataType}}}; {{/allParams}} }, {{/hasParams}}options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}any{{/returnType}}> { const fetchArgs = {{classname}}FetchParamCreator.{{nickname}}({{#hasParams}}params, {{/hasParams}}options); @@ -163,10 +171,14 @@ export const {{classname}}Fp = { */ export class {{classname}} extends BaseAPI { {{#operation}} - /** {{#summary}} - * {{summary}}{{/summary}}{{#notes}} - * {{notes}}{{/notes}}{{#allParams}} - * @param {{paramName}} {{description}}{{/allParams}} + /** + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} + {{#allParams}} + * @param {{paramName}} {{description}} + {{/allParams}} */ {{nickname}}({{#hasParams}}params: { {{#allParams}} "{{paramName}}"{{^required}}?{{/required}}: {{{dataType}}};{{/allParams}} }, {{/hasParams}}options?: any) { return {{classname}}Fp.{{nickname}}({{#hasParams}}params, {{/hasParams}}options)(this.fetch, this.basePath); @@ -181,10 +193,14 @@ export class {{classname}} extends BaseAPI { export const {{classname}}Factory = function (fetch?: FetchAPI, basePath?: string) { return { {{#operation}} - /** {{#summary}} - * {{summary}}{{/summary}}{{#notes}} - * {{notes}}{{/notes}}{{#allParams}} - * @param {{paramName}} {{description}}{{/allParams}} + /** + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} + {{#allParams}} + * @param {{paramName}} {{description}} + {{/allParams}} */ {{nickname}}({{#hasParams}}params: { {{#allParams}} "{{paramName}}"{{^required}}?{{/required}}: {{{dataType}}};{{/allParams}} }, {{/hasParams}}options?: any) { return {{classname}}Fp.{{nickname}}({{#hasParams}}params, {{/hasParams}}options)(fetch, basePath); diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular/api.mustache index 8fc8ca79941..856fb21fcab 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular/api.mustache @@ -23,10 +23,12 @@ export class {{classname}} { {{#operation}} /** - * {{summary}} - * {{notes}} - {{#allParams}}* @param {{paramName}} {{description}} - {{/allParams}}*/ + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} + {{#allParams}}* @param {{paramName}} {{description}} + {{/allParams}}*/ public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> { const localVarPath = this.basePath + '{{{path}}}'{{#pathParams}} .replace('{' + '{{baseName}}' + '}', String({{paramName}})){{/pathParams}}; 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 08ab7e5bd51..b2098aac65f 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache @@ -46,7 +46,7 @@ export class {{classname}} { {{#operation}} /** - * {{notes}} + * {{¬es}} {{#summary}} * @summary {{&summary}} {{/summary}} diff --git a/modules/swagger-codegen/src/main/resources/typescript-jquery/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-jquery/api.mustache index 319c16e9bf8..0eaeaefeaaa 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-jquery/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-jquery/api.mustache @@ -178,8 +178,10 @@ export class {{classname}} { {{#operation}} /** - * {{summary}} - * {{notes}} + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} {{#allParams}}* @param {{paramName}} {{description}} {{/allParams}}*/ public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : JQueryPromise<{ response: JQueryXHR; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }> { diff --git a/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache index 735b35f4322..51d84f9a819 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache @@ -197,8 +197,10 @@ export class {{classname}} { {{/authMethods}} {{#operation}} /** - * {{summary}} - * {{notes}} + * {{¬es}} + {{#summary}} + * @summary {{&summary}} + {{/summary}} {{#allParams}}* @param {{paramName}} {{description}} {{/allParams}}*/ public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : Promise<{ response: http.{{#supportsES6}}IncomingMessage{{/supportsES6}}{{^supportsES6}}ClientResponse{{/supportsES6}}; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }> { diff --git a/samples/client/petstore/typescript-angular/api/PetApi.ts b/samples/client/petstore/typescript-angular/api/PetApi.ts index 887f87a1be9..0d182b75d08 100644 --- a/samples/client/petstore/typescript-angular/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular/api/PetApi.ts @@ -27,10 +27,10 @@ export class PetApi { } /** - * Add a new pet to the store - * - * @param body Pet object that needs to be added to the store - */ + * + * @summary Add a new pet to the store + * @param body Pet object that needs to be added to the store + */ public addPet (body?: models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet'; @@ -51,11 +51,11 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * Deletes a pet - * - * @param petId Pet id to delete - * @param apiKey - */ + * + * @summary Deletes a pet + * @param petId Pet id to delete + * @param apiKey + */ public deletePet (petId: number, apiKey?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', String(petId)); @@ -82,10 +82,10 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * @param status Status values that need to be considered for filter - */ + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param status Status values that need to be considered for filter + */ public findPetsByStatus (status?: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise> { const localVarPath = this.basePath + '/pet/findByStatus'; @@ -109,10 +109,10 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @param tags Tags to filter by - */ + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param tags Tags to filter by + */ public findPetsByTags (tags?: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise> { const localVarPath = this.basePath + '/pet/findByTags'; @@ -136,10 +136,10 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * Find pet by ID - * 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 - */ + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID + * @param petId ID of pet that needs to be fetched + */ public getPetById (petId: number, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', String(petId)); @@ -164,10 +164,10 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * Update an existing pet - * - * @param body Pet object that needs to be added to the store - */ + * + * @summary Update an existing pet + * @param body Pet object that needs to be added to the store + */ public updatePet (body?: models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet'; @@ -188,12 +188,12 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * Updates a pet in the store with form data - * - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ + * + * @summary Updates a pet in the store with form data + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet + * @param status Updated status of the pet + */ public updatePetWithForm (petId: string, name?: string, status?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', String(petId)); @@ -227,12 +227,12 @@ export class PetApi { return this.$http(httpRequestParams); } /** - * uploads an image - * - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ + * + * @summary uploads an image + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param file file to upload + */ public uploadFile (petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet/{petId}/uploadImage' .replace('{' + 'petId' + '}', String(petId)); diff --git a/samples/client/petstore/typescript-angular/api/StoreApi.ts b/samples/client/petstore/typescript-angular/api/StoreApi.ts index efb81af53df..bb71dc9846e 100644 --- a/samples/client/petstore/typescript-angular/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular/api/StoreApi.ts @@ -27,10 +27,10 @@ export class StoreApi { } /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - */ + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID + * @param orderId ID of the order that needs to be deleted + */ public deleteOrder (orderId: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/store/order/{orderId}' .replace('{' + 'orderId' + '}', String(orderId)); @@ -55,9 +55,9 @@ export class StoreApi { return this.$http(httpRequestParams); } /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - */ + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + */ public getInventory (extraHttpRequestParams?: any ) : ng.IHttpPromise<{ [key: string]: number; }> { const localVarPath = this.basePath + '/store/inventory'; @@ -77,10 +77,10 @@ export class StoreApi { return this.$http(httpRequestParams); } /** - * Find purchase order by ID - * 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 - */ + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param orderId ID of pet that needs to be fetched + */ public getOrderById (orderId: string, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/store/order/{orderId}' .replace('{' + 'orderId' + '}', String(orderId)); @@ -105,10 +105,10 @@ export class StoreApi { return this.$http(httpRequestParams); } /** - * Place an order for a pet - * - * @param body order placed for purchasing the pet - */ + * + * @summary Place an order for a pet + * @param body order placed for purchasing the pet + */ public placeOrder (body?: models.Order, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/store/order'; diff --git a/samples/client/petstore/typescript-angular/api/UserApi.ts b/samples/client/petstore/typescript-angular/api/UserApi.ts index 15689b0c82d..63cbd7c4dcf 100644 --- a/samples/client/petstore/typescript-angular/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular/api/UserApi.ts @@ -27,10 +27,10 @@ export class UserApi { } /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - */ + * This can only be done by the logged in user. + * @summary Create user + * @param body Created user object + */ public createUser (body?: models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user'; @@ -51,10 +51,10 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Creates list of users with given input array - * - * @param body List of user object - */ + * + * @summary Creates list of users with given input array + * @param body List of user object + */ public createUsersWithArrayInput (body?: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/createWithArray'; @@ -75,10 +75,10 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Creates list of users with given input array - * - * @param body List of user object - */ + * + * @summary Creates list of users with given input array + * @param body List of user object + */ public createUsersWithListInput (body?: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/createWithList'; @@ -99,10 +99,10 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - */ + * This can only be done by the logged in user. + * @summary Delete user + * @param username The name that needs to be deleted + */ public deleteUser (username: string, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', String(username)); @@ -127,10 +127,10 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. - */ + * + * @summary Get user by user name + * @param username The name that needs to be fetched. Use user1 for testing. + */ public getUserByName (username: string, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', String(username)); @@ -155,11 +155,11 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Logs user into the system - * - * @param username The user name for login - * @param password The password for login in clear text - */ + * + * @summary Logs user into the system + * @param username The user name for login + * @param password The password for login in clear text + */ public loginUser (username?: string, password?: string, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/user/login'; @@ -187,9 +187,9 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Logs out current logged in user session - * - */ + * + * @summary Logs out current logged in user session + */ public logoutUser (extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/logout'; @@ -209,11 +209,11 @@ export class UserApi { return this.$http(httpRequestParams); } /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - */ + * This can only be done by the logged in user. + * @summary Updated user + * @param username name that need to be deleted + * @param body Updated user object + */ public updateUser (username: string, body?: models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', String(username)); diff --git a/samples/client/petstore/typescript-fetch/builds/default/api.ts b/samples/client/petstore/typescript-fetch/builds/default/api.ts index 77011719163..34271f7c8fb 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/api.ts @@ -92,9 +92,9 @@ export interface User { * PetApi - fetch parameter creator */ export const PetApiFetchParamCreator = { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any): FetchArgs { @@ -115,9 +115,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -140,9 +140,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any): FetchArgs { @@ -162,9 +162,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any): FetchArgs { @@ -184,9 +184,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any): FetchArgs { @@ -208,9 +208,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any): FetchArgs { @@ -231,9 +231,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -262,9 +262,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -299,9 +299,9 @@ export const PetApiFetchParamCreator = { * PetApi - functional programming interface */ export const PetApiFp = { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -316,9 +316,9 @@ export const PetApiFp = { }); }; }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -334,9 +334,9 @@ export const PetApiFp = { }); }; }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise> { @@ -351,9 +351,9 @@ export const PetApiFp = { }); }; }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise> { @@ -368,9 +368,9 @@ export const PetApiFp = { }); }; }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -385,9 +385,9 @@ export const PetApiFp = { }); }; }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -402,9 +402,9 @@ export const PetApiFp = { }); }; }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -421,9 +421,9 @@ export const PetApiFp = { }); }; }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -446,58 +446,58 @@ export const PetApiFp = { * PetApi - object-oriented interface */ export class PetApi extends BaseAPI { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.addPet(params, options)(this.fetch, this.basePath); } - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ deletePet(params: { "petId": number; "apiKey"?: string; }, options?: any) { return PetApiFp.deletePet(params, options)(this.fetch, this.basePath); } - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any) { return PetApiFp.findPetsByStatus(params, options)(this.fetch, this.basePath); } - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any) { return PetApiFp.findPetsByTags(params, options)(this.fetch, this.basePath); } - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any) { return PetApiFp.getPetById(params, options)(this.fetch, this.basePath); } - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.updatePet(params, options)(this.fetch, this.basePath); } - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -505,9 +505,9 @@ export class PetApi extends BaseAPI { updatePetWithForm(params: { "petId": string; "name"?: string; "status"?: string; }, options?: any) { return PetApiFp.updatePetWithForm(params, options)(this.fetch, this.basePath); } - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -522,58 +522,58 @@ export class PetApi extends BaseAPI { */ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.addPet(params, options)(fetch, basePath); }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ deletePet(params: { "petId": number; "apiKey"?: string; }, options?: any) { return PetApiFp.deletePet(params, options)(fetch, basePath); }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any) { return PetApiFp.findPetsByStatus(params, options)(fetch, basePath); }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any) { return PetApiFp.findPetsByTags(params, options)(fetch, basePath); }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any) { return PetApiFp.getPetById(params, options)(fetch, basePath); }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.updatePet(params, options)(fetch, basePath); }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -581,9 +581,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { updatePetWithForm(params: { "petId": string; "name"?: string; "status"?: string; }, options?: any) { return PetApiFp.updatePetWithForm(params, options)(fetch, basePath); }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -599,9 +599,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { * StoreApi - fetch parameter creator */ export const StoreApiFetchParamCreator = { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any): FetchArgs { @@ -623,9 +623,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any): FetchArgs { const baseUrl = `/store/inventory`; @@ -641,9 +641,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any): FetchArgs { @@ -665,9 +665,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any): FetchArgs { @@ -694,9 +694,9 @@ export const StoreApiFetchParamCreator = { * StoreApi - functional programming interface */ export const StoreApiFp = { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -711,9 +711,9 @@ export const StoreApiFp = { }); }; }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<{ [key: string]: number; }> { const fetchArgs = StoreApiFetchParamCreator.getInventory(options); @@ -727,9 +727,9 @@ export const StoreApiFp = { }); }; }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -744,9 +744,9 @@ export const StoreApiFp = { }); }; }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -767,32 +767,32 @@ export const StoreApiFp = { * StoreApi - object-oriented interface */ export class StoreApi extends BaseAPI { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any) { return StoreApiFp.deleteOrder(params, options)(this.fetch, this.basePath); } - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any) { return StoreApiFp.getInventory(options)(this.fetch, this.basePath); } - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any) { return StoreApiFp.getOrderById(params, options)(this.fetch, this.basePath); } - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any) { @@ -805,32 +805,32 @@ export class StoreApi extends BaseAPI { */ export const StoreApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any) { return StoreApiFp.deleteOrder(params, options)(fetch, basePath); }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any) { return StoreApiFp.getInventory(options)(fetch, basePath); }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any) { return StoreApiFp.getOrderById(params, options)(fetch, basePath); }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any) { @@ -844,9 +844,9 @@ export const StoreApiFactory = function (fetch?: FetchAPI, basePath?: string) { * UserApi - fetch parameter creator */ export const UserApiFetchParamCreator = { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any): FetchArgs { @@ -867,9 +867,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any): FetchArgs { @@ -890,9 +890,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any): FetchArgs { @@ -913,9 +913,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any): FetchArgs { @@ -937,9 +937,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any): FetchArgs { @@ -961,9 +961,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -985,9 +985,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any): FetchArgs { const baseUrl = `/user/logout`; @@ -1003,9 +1003,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1038,9 +1038,9 @@ export const UserApiFetchParamCreator = { * UserApi - functional programming interface */ export const UserApiFp = { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1055,9 +1055,9 @@ export const UserApiFp = { }); }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1072,9 +1072,9 @@ export const UserApiFp = { }); }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1089,9 +1089,9 @@ export const UserApiFp = { }); }; }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1106,9 +1106,9 @@ export const UserApiFp = { }); }; }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1123,9 +1123,9 @@ export const UserApiFp = { }); }; }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1141,9 +1141,9 @@ export const UserApiFp = { }); }; }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { const fetchArgs = UserApiFetchParamCreator.logoutUser(options); @@ -1157,9 +1157,9 @@ export const UserApiFp = { }); }; }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1181,65 +1181,65 @@ export const UserApiFp = { * UserApi - object-oriented interface */ export class UserApi extends BaseAPI { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any) { return UserApiFp.createUser(params, options)(this.fetch, this.basePath); } - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithArrayInput(params, options)(this.fetch, this.basePath); } - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithListInput(params, options)(this.fetch, this.basePath); } - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any) { return UserApiFp.deleteUser(params, options)(this.fetch, this.basePath); } - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any) { return UserApiFp.getUserByName(params, options)(this.fetch, this.basePath); } - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ loginUser(params: { "username"?: string; "password"?: string; }, options?: any) { return UserApiFp.loginUser(params, options)(this.fetch, this.basePath); } - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any) { return UserApiFp.logoutUser(options)(this.fetch, this.basePath); } - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1253,65 +1253,65 @@ export class UserApi extends BaseAPI { */ export const UserApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any) { return UserApiFp.createUser(params, options)(fetch, basePath); }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithArrayInput(params, options)(fetch, basePath); }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithListInput(params, options)(fetch, basePath); }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any) { return UserApiFp.deleteUser(params, options)(fetch, basePath); }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any) { return UserApiFp.getUserByName(params, options)(fetch, basePath); }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ loginUser(params: { "username"?: string; "password"?: string; }, options?: any) { return UserApiFp.loginUser(params, options)(fetch, basePath); }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any) { return UserApiFp.logoutUser(options)(fetch, basePath); }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts index c7f1a032306..8e4b73e6c83 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts @@ -91,9 +91,9 @@ export interface User { * PetApi - fetch parameter creator */ export const PetApiFetchParamCreator = { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any): FetchArgs { @@ -114,9 +114,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -139,9 +139,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any): FetchArgs { @@ -161,9 +161,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any): FetchArgs { @@ -183,9 +183,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any): FetchArgs { @@ -207,9 +207,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any): FetchArgs { @@ -230,9 +230,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -261,9 +261,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -298,9 +298,9 @@ export const PetApiFetchParamCreator = { * PetApi - functional programming interface */ export const PetApiFp = { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -315,9 +315,9 @@ export const PetApiFp = { }); }; }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -333,9 +333,9 @@ export const PetApiFp = { }); }; }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise> { @@ -350,9 +350,9 @@ export const PetApiFp = { }); }; }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise> { @@ -367,9 +367,9 @@ export const PetApiFp = { }); }; }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -384,9 +384,9 @@ export const PetApiFp = { }); }; }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -401,9 +401,9 @@ export const PetApiFp = { }); }; }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -420,9 +420,9 @@ export const PetApiFp = { }); }; }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -445,58 +445,58 @@ export const PetApiFp = { * PetApi - object-oriented interface */ export class PetApi extends BaseAPI { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.addPet(params, options)(this.fetch, this.basePath); } - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ deletePet(params: { "petId": number; "apiKey"?: string; }, options?: any) { return PetApiFp.deletePet(params, options)(this.fetch, this.basePath); } - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any) { return PetApiFp.findPetsByStatus(params, options)(this.fetch, this.basePath); } - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any) { return PetApiFp.findPetsByTags(params, options)(this.fetch, this.basePath); } - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any) { return PetApiFp.getPetById(params, options)(this.fetch, this.basePath); } - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.updatePet(params, options)(this.fetch, this.basePath); } - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -504,9 +504,9 @@ export class PetApi extends BaseAPI { updatePetWithForm(params: { "petId": string; "name"?: string; "status"?: string; }, options?: any) { return PetApiFp.updatePetWithForm(params, options)(this.fetch, this.basePath); } - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -521,58 +521,58 @@ export class PetApi extends BaseAPI { */ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.addPet(params, options)(fetch, basePath); }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ deletePet(params: { "petId": number; "apiKey"?: string; }, options?: any) { return PetApiFp.deletePet(params, options)(fetch, basePath); }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any) { return PetApiFp.findPetsByStatus(params, options)(fetch, basePath); }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any) { return PetApiFp.findPetsByTags(params, options)(fetch, basePath); }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any) { return PetApiFp.getPetById(params, options)(fetch, basePath); }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.updatePet(params, options)(fetch, basePath); }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -580,9 +580,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { updatePetWithForm(params: { "petId": string; "name"?: string; "status"?: string; }, options?: any) { return PetApiFp.updatePetWithForm(params, options)(fetch, basePath); }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -598,9 +598,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { * StoreApi - fetch parameter creator */ export const StoreApiFetchParamCreator = { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any): FetchArgs { @@ -622,9 +622,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any): FetchArgs { const baseUrl = `/store/inventory`; @@ -640,9 +640,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any): FetchArgs { @@ -664,9 +664,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any): FetchArgs { @@ -693,9 +693,9 @@ export const StoreApiFetchParamCreator = { * StoreApi - functional programming interface */ export const StoreApiFp = { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -710,9 +710,9 @@ export const StoreApiFp = { }); }; }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<{ [key: string]: number; }> { const fetchArgs = StoreApiFetchParamCreator.getInventory(options); @@ -726,9 +726,9 @@ export const StoreApiFp = { }); }; }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -743,9 +743,9 @@ export const StoreApiFp = { }); }; }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -766,32 +766,32 @@ export const StoreApiFp = { * StoreApi - object-oriented interface */ export class StoreApi extends BaseAPI { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any) { return StoreApiFp.deleteOrder(params, options)(this.fetch, this.basePath); } - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any) { return StoreApiFp.getInventory(options)(this.fetch, this.basePath); } - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any) { return StoreApiFp.getOrderById(params, options)(this.fetch, this.basePath); } - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any) { @@ -804,32 +804,32 @@ export class StoreApi extends BaseAPI { */ export const StoreApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any) { return StoreApiFp.deleteOrder(params, options)(fetch, basePath); }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any) { return StoreApiFp.getInventory(options)(fetch, basePath); }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any) { return StoreApiFp.getOrderById(params, options)(fetch, basePath); }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any) { @@ -843,9 +843,9 @@ export const StoreApiFactory = function (fetch?: FetchAPI, basePath?: string) { * UserApi - fetch parameter creator */ export const UserApiFetchParamCreator = { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any): FetchArgs { @@ -866,9 +866,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any): FetchArgs { @@ -889,9 +889,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any): FetchArgs { @@ -912,9 +912,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any): FetchArgs { @@ -936,9 +936,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any): FetchArgs { @@ -960,9 +960,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -984,9 +984,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any): FetchArgs { const baseUrl = `/user/logout`; @@ -1002,9 +1002,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1037,9 +1037,9 @@ export const UserApiFetchParamCreator = { * UserApi - functional programming interface */ export const UserApiFp = { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1054,9 +1054,9 @@ export const UserApiFp = { }); }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1071,9 +1071,9 @@ export const UserApiFp = { }); }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1088,9 +1088,9 @@ export const UserApiFp = { }); }; }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1105,9 +1105,9 @@ export const UserApiFp = { }); }; }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1122,9 +1122,9 @@ export const UserApiFp = { }); }; }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1140,9 +1140,9 @@ export const UserApiFp = { }); }; }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { const fetchArgs = UserApiFetchParamCreator.logoutUser(options); @@ -1156,9 +1156,9 @@ export const UserApiFp = { }); }; }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1180,65 +1180,65 @@ export const UserApiFp = { * UserApi - object-oriented interface */ export class UserApi extends BaseAPI { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any) { return UserApiFp.createUser(params, options)(this.fetch, this.basePath); } - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithArrayInput(params, options)(this.fetch, this.basePath); } - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithListInput(params, options)(this.fetch, this.basePath); } - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any) { return UserApiFp.deleteUser(params, options)(this.fetch, this.basePath); } - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any) { return UserApiFp.getUserByName(params, options)(this.fetch, this.basePath); } - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ loginUser(params: { "username"?: string; "password"?: string; }, options?: any) { return UserApiFp.loginUser(params, options)(this.fetch, this.basePath); } - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any) { return UserApiFp.logoutUser(options)(this.fetch, this.basePath); } - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1252,65 +1252,65 @@ export class UserApi extends BaseAPI { */ export const UserApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any) { return UserApiFp.createUser(params, options)(fetch, basePath); }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithArrayInput(params, options)(fetch, basePath); }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithListInput(params, options)(fetch, basePath); }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any) { return UserApiFp.deleteUser(params, options)(fetch, basePath); }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any) { return UserApiFp.getUserByName(params, options)(fetch, basePath); }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ loginUser(params: { "username"?: string; "password"?: string; }, options?: any) { return UserApiFp.loginUser(params, options)(fetch, basePath); }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any) { return UserApiFp.logoutUser(options)(fetch, basePath); }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts index 77011719163..34271f7c8fb 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts @@ -92,9 +92,9 @@ export interface User { * PetApi - fetch parameter creator */ export const PetApiFetchParamCreator = { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any): FetchArgs { @@ -115,9 +115,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -140,9 +140,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any): FetchArgs { @@ -162,9 +162,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any): FetchArgs { @@ -184,9 +184,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any): FetchArgs { @@ -208,9 +208,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any): FetchArgs { @@ -231,9 +231,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -262,9 +262,9 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -299,9 +299,9 @@ export const PetApiFetchParamCreator = { * PetApi - functional programming interface */ export const PetApiFp = { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -316,9 +316,9 @@ export const PetApiFp = { }); }; }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -334,9 +334,9 @@ export const PetApiFp = { }); }; }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise> { @@ -351,9 +351,9 @@ export const PetApiFp = { }); }; }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise> { @@ -368,9 +368,9 @@ export const PetApiFp = { }); }; }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -385,9 +385,9 @@ export const PetApiFp = { }); }; }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -402,9 +402,9 @@ export const PetApiFp = { }); }; }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -421,9 +421,9 @@ export const PetApiFp = { }); }; }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -446,58 +446,58 @@ export const PetApiFp = { * PetApi - object-oriented interface */ export class PetApi extends BaseAPI { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.addPet(params, options)(this.fetch, this.basePath); } - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ deletePet(params: { "petId": number; "apiKey"?: string; }, options?: any) { return PetApiFp.deletePet(params, options)(this.fetch, this.basePath); } - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any) { return PetApiFp.findPetsByStatus(params, options)(this.fetch, this.basePath); } - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any) { return PetApiFp.findPetsByTags(params, options)(this.fetch, this.basePath); } - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any) { return PetApiFp.getPetById(params, options)(this.fetch, this.basePath); } - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.updatePet(params, options)(this.fetch, this.basePath); } - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -505,9 +505,9 @@ export class PetApi extends BaseAPI { updatePetWithForm(params: { "petId": string; "name"?: string; "status"?: string; }, options?: any) { return PetApiFp.updatePetWithForm(params, options)(this.fetch, this.basePath); } - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -522,58 +522,58 @@ export class PetApi extends BaseAPI { */ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Add a new pet to the store + /** * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ addPet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.addPet(params, options)(fetch, basePath); }, - /** - * Deletes a pet + /** * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ deletePet(params: { "petId": number; "apiKey"?: string; }, options?: any) { return PetApiFp.deletePet(params, options)(fetch, basePath); }, - /** - * Finds Pets by status + /** * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ findPetsByStatus(params: { "status"?: Array; }, options?: any) { return PetApiFp.findPetsByStatus(params, options)(fetch, basePath); }, - /** - * Finds Pets by tags + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ findPetsByTags(params: { "tags"?: Array; }, options?: any) { return PetApiFp.findPetsByTags(params, options)(fetch, basePath); }, - /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + /** + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ getPetById(params: { "petId": number; }, options?: any) { return PetApiFp.getPetById(params, options)(fetch, basePath); }, - /** - * Update an existing pet + /** * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ updatePet(params: { "body"?: Pet; }, options?: any) { return PetApiFp.updatePet(params, options)(fetch, basePath); }, - /** - * Updates a pet in the store with form data + /** * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -581,9 +581,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { updatePetWithForm(params: { "petId": string; "name"?: string; "status"?: string; }, options?: any) { return PetApiFp.updatePetWithForm(params, options)(fetch, basePath); }, - /** - * uploads an image + /** * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -599,9 +599,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { * StoreApi - fetch parameter creator */ export const StoreApiFetchParamCreator = { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any): FetchArgs { @@ -623,9 +623,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any): FetchArgs { const baseUrl = `/store/inventory`; @@ -641,9 +641,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any): FetchArgs { @@ -665,9 +665,9 @@ export const StoreApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any): FetchArgs { @@ -694,9 +694,9 @@ export const StoreApiFetchParamCreator = { * StoreApi - functional programming interface */ export const StoreApiFp = { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -711,9 +711,9 @@ export const StoreApiFp = { }); }; }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<{ [key: string]: number; }> { const fetchArgs = StoreApiFetchParamCreator.getInventory(options); @@ -727,9 +727,9 @@ export const StoreApiFp = { }); }; }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -744,9 +744,9 @@ export const StoreApiFp = { }); }; }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -767,32 +767,32 @@ export const StoreApiFp = { * StoreApi - object-oriented interface */ export class StoreApi extends BaseAPI { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any) { return StoreApiFp.deleteOrder(params, options)(this.fetch, this.basePath); } - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any) { return StoreApiFp.getInventory(options)(this.fetch, this.basePath); } - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any) { return StoreApiFp.getOrderById(params, options)(this.fetch, this.basePath); } - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any) { @@ -805,32 +805,32 @@ export class StoreApi extends BaseAPI { */ export const StoreApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /** + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ deleteOrder(params: { "orderId": string; }, options?: any) { return StoreApiFp.deleteOrder(params, options)(fetch, basePath); }, - /** - * Returns pet inventories by status + /** * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ getInventory(options?: any) { return StoreApiFp.getInventory(options)(fetch, basePath); }, - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ getOrderById(params: { "orderId": string; }, options?: any) { return StoreApiFp.getOrderById(params, options)(fetch, basePath); }, - /** - * Place an order for a pet + /** * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ placeOrder(params: { "body"?: Order; }, options?: any) { @@ -844,9 +844,9 @@ export const StoreApiFactory = function (fetch?: FetchAPI, basePath?: string) { * UserApi - fetch parameter creator */ export const UserApiFetchParamCreator = { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any): FetchArgs { @@ -867,9 +867,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any): FetchArgs { @@ -890,9 +890,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any): FetchArgs { @@ -913,9 +913,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any): FetchArgs { @@ -937,9 +937,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any): FetchArgs { @@ -961,9 +961,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -985,9 +985,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any): FetchArgs { const baseUrl = `/user/logout`; @@ -1003,9 +1003,9 @@ export const UserApiFetchParamCreator = { options: fetchOptions, }; }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1038,9 +1038,9 @@ export const UserApiFetchParamCreator = { * UserApi - functional programming interface */ export const UserApiFp = { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1055,9 +1055,9 @@ export const UserApiFp = { }); }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1072,9 +1072,9 @@ export const UserApiFp = { }); }; }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1089,9 +1089,9 @@ export const UserApiFp = { }); }; }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1106,9 +1106,9 @@ export const UserApiFp = { }); }; }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { @@ -1123,9 +1123,9 @@ export const UserApiFp = { }); }; }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1141,9 +1141,9 @@ export const UserApiFp = { }); }; }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { const fetchArgs = UserApiFetchParamCreator.logoutUser(options); @@ -1157,9 +1157,9 @@ export const UserApiFp = { }); }; }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1181,65 +1181,65 @@ export const UserApiFp = { * UserApi - object-oriented interface */ export class UserApi extends BaseAPI { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any) { return UserApiFp.createUser(params, options)(this.fetch, this.basePath); } - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithArrayInput(params, options)(this.fetch, this.basePath); } - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithListInput(params, options)(this.fetch, this.basePath); } - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any) { return UserApiFp.deleteUser(params, options)(this.fetch, this.basePath); } - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any) { return UserApiFp.getUserByName(params, options)(this.fetch, this.basePath); } - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ loginUser(params: { "username"?: string; "password"?: string; }, options?: any) { return UserApiFp.loginUser(params, options)(this.fetch, this.basePath); } - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any) { return UserApiFp.logoutUser(options)(this.fetch, this.basePath); } - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ @@ -1253,65 +1253,65 @@ export class UserApi extends BaseAPI { */ export const UserApiFactory = function (fetch?: FetchAPI, basePath?: string) { return { - /** - * Create user + /** * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ createUser(params: { "body"?: User; }, options?: any) { return UserApiFp.createUser(params, options)(fetch, basePath); }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithArrayInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithArrayInput(params, options)(fetch, basePath); }, - /** - * Creates list of users with given input array + /** * + * @summary Creates list of users with given input array * @param body List of user object */ createUsersWithListInput(params: { "body"?: Array; }, options?: any) { return UserApiFp.createUsersWithListInput(params, options)(fetch, basePath); }, - /** - * Delete user + /** * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ deleteUser(params: { "username": string; }, options?: any) { return UserApiFp.deleteUser(params, options)(fetch, basePath); }, - /** - * Get user by user name + /** * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ getUserByName(params: { "username": string; }, options?: any) { return UserApiFp.getUserByName(params, options)(fetch, basePath); }, - /** - * Logs user into the system + /** * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ loginUser(params: { "username"?: string; "password"?: string; }, options?: any) { return UserApiFp.loginUser(params, options)(fetch, basePath); }, - /** - * Logs out current logged in user session + /** * + * @summary Logs out current logged in user session */ logoutUser(options?: any) { return UserApiFp.logoutUser(options)(fetch, basePath); }, - /** - * Updated user + /** * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ diff --git a/samples/client/petstore/typescript-jquery/default/api.ts b/samples/client/petstore/typescript-jquery/default/api.ts index 635057c3432..9bcd271b9ef 100644 --- a/samples/client/petstore/typescript-jquery/default/api.ts +++ b/samples/client/petstore/typescript-jquery/default/api.ts @@ -158,8 +158,8 @@ export class PetApi { } /** - * Add a new pet to the store * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ public addPet (body?: Pet) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -203,8 +203,8 @@ export class PetApi { return dfd.promise(); } /** - * Deletes a pet * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -256,8 +256,8 @@ export class PetApi { return dfd.promise(); } /** - * Finds Pets by status * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ public findPetsByStatus (status?: Array) : JQueryPromise<{ response: JQueryXHR; body: Array; }> { @@ -304,8 +304,8 @@ export class PetApi { return dfd.promise(); } /** - * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ public findPetsByTags (tags?: Array) : JQueryPromise<{ response: JQueryXHR; body: Array; }> { @@ -352,8 +352,8 @@ export class PetApi { return dfd.promise(); } /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ public getPetById (petId: number) : JQueryPromise<{ response: JQueryXHR; body: Pet; }> { @@ -404,8 +404,8 @@ export class PetApi { return dfd.promise(); } /** - * Update an existing pet * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ public updatePet (body?: Pet) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -449,8 +449,8 @@ export class PetApi { return dfd.promise(); } /** - * Updates a pet in the store with form data * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -511,8 +511,8 @@ export class PetApi { return dfd.promise(); } /** - * uploads an image * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -618,8 +618,8 @@ export class StoreApi { } /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ public deleteOrder (orderId: string) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -666,8 +666,8 @@ export class StoreApi { return dfd.promise(); } /** - * Returns pet inventories by status * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ public getInventory () : JQueryPromise<{ response: JQueryXHR; body: { [key: string]: number; }; }> { let localVarPath = this.basePath + '/store/inventory'; @@ -709,8 +709,8 @@ export class StoreApi { return dfd.promise(); } /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ public getOrderById (orderId: string) : JQueryPromise<{ response: JQueryXHR; body: Order; }> { @@ -757,8 +757,8 @@ export class StoreApi { return dfd.promise(); } /** - * Place an order for a pet * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ public placeOrder (body?: Order) : JQueryPromise<{ response: JQueryXHR; body: Order; }> { @@ -844,8 +844,8 @@ export class UserApi { } /** - * Create user * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ public createUser (body?: User) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -887,8 +887,8 @@ export class UserApi { return dfd.promise(); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithArrayInput (body?: Array) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -930,8 +930,8 @@ export class UserApi { return dfd.promise(); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithListInput (body?: Array) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -973,8 +973,8 @@ export class UserApi { return dfd.promise(); } /** - * Delete user * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ public deleteUser (username: string) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -1021,8 +1021,8 @@ export class UserApi { return dfd.promise(); } /** - * Get user by user name * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : JQueryPromise<{ response: JQueryXHR; body: User; }> { @@ -1069,8 +1069,8 @@ export class UserApi { return dfd.promise(); } /** - * Logs user into the system * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1120,8 +1120,8 @@ export class UserApi { return dfd.promise(); } /** - * Logs out current logged in user session * + * @summary Logs out current logged in user session */ public logoutUser () : JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/logout'; @@ -1161,8 +1161,8 @@ export class UserApi { return dfd.promise(); } /** - * Updated user * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ diff --git a/samples/client/petstore/typescript-jquery/npm/api.ts b/samples/client/petstore/typescript-jquery/npm/api.ts index 635057c3432..9bcd271b9ef 100644 --- a/samples/client/petstore/typescript-jquery/npm/api.ts +++ b/samples/client/petstore/typescript-jquery/npm/api.ts @@ -158,8 +158,8 @@ export class PetApi { } /** - * Add a new pet to the store * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ public addPet (body?: Pet) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -203,8 +203,8 @@ export class PetApi { return dfd.promise(); } /** - * Deletes a pet * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -256,8 +256,8 @@ export class PetApi { return dfd.promise(); } /** - * Finds Pets by status * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ public findPetsByStatus (status?: Array) : JQueryPromise<{ response: JQueryXHR; body: Array; }> { @@ -304,8 +304,8 @@ export class PetApi { return dfd.promise(); } /** - * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ public findPetsByTags (tags?: Array) : JQueryPromise<{ response: JQueryXHR; body: Array; }> { @@ -352,8 +352,8 @@ export class PetApi { return dfd.promise(); } /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ public getPetById (petId: number) : JQueryPromise<{ response: JQueryXHR; body: Pet; }> { @@ -404,8 +404,8 @@ export class PetApi { return dfd.promise(); } /** - * Update an existing pet * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ public updatePet (body?: Pet) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -449,8 +449,8 @@ export class PetApi { return dfd.promise(); } /** - * Updates a pet in the store with form data * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -511,8 +511,8 @@ export class PetApi { return dfd.promise(); } /** - * uploads an image * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -618,8 +618,8 @@ export class StoreApi { } /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ public deleteOrder (orderId: string) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -666,8 +666,8 @@ export class StoreApi { return dfd.promise(); } /** - * Returns pet inventories by status * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ public getInventory () : JQueryPromise<{ response: JQueryXHR; body: { [key: string]: number; }; }> { let localVarPath = this.basePath + '/store/inventory'; @@ -709,8 +709,8 @@ export class StoreApi { return dfd.promise(); } /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ public getOrderById (orderId: string) : JQueryPromise<{ response: JQueryXHR; body: Order; }> { @@ -757,8 +757,8 @@ export class StoreApi { return dfd.promise(); } /** - * Place an order for a pet * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ public placeOrder (body?: Order) : JQueryPromise<{ response: JQueryXHR; body: Order; }> { @@ -844,8 +844,8 @@ export class UserApi { } /** - * Create user * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ public createUser (body?: User) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -887,8 +887,8 @@ export class UserApi { return dfd.promise(); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithArrayInput (body?: Array) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -930,8 +930,8 @@ export class UserApi { return dfd.promise(); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithListInput (body?: Array) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -973,8 +973,8 @@ export class UserApi { return dfd.promise(); } /** - * Delete user * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ public deleteUser (username: string) : JQueryPromise<{ response: JQueryXHR; body?: any; }> { @@ -1021,8 +1021,8 @@ export class UserApi { return dfd.promise(); } /** - * Get user by user name * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : JQueryPromise<{ response: JQueryXHR; body: User; }> { @@ -1069,8 +1069,8 @@ export class UserApi { return dfd.promise(); } /** - * Logs user into the system * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1120,8 +1120,8 @@ export class UserApi { return dfd.promise(); } /** - * Logs out current logged in user session * + * @summary Logs out current logged in user session */ public logoutUser () : JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/logout'; @@ -1161,8 +1161,8 @@ export class UserApi { return dfd.promise(); } /** - * Updated user * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ diff --git a/samples/client/petstore/typescript-node/default/api.ts b/samples/client/petstore/typescript-node/default/api.ts index 11e3a970e40..5b30eee14a6 100644 --- a/samples/client/petstore/typescript-node/default/api.ts +++ b/samples/client/petstore/typescript-node/default/api.ts @@ -187,8 +187,8 @@ export class PetApi { this.authentications.petstore_auth.accessToken = token; } /** - * Add a new pet to the store * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ public addPet (body?: Pet) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -236,8 +236,8 @@ export class PetApi { }); } /** - * Deletes a pet * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -293,8 +293,8 @@ export class PetApi { }); } /** - * Finds Pets by status * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ public findPetsByStatus (status?: Array) : Promise<{ response: http.ClientResponse; body: Array; }> { @@ -345,8 +345,8 @@ export class PetApi { }); } /** - * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ public findPetsByTags (tags?: Array) : Promise<{ response: http.ClientResponse; body: Array; }> { @@ -397,8 +397,8 @@ export class PetApi { }); } /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ public getPetById (petId: number) : Promise<{ response: http.ClientResponse; body: Pet; }> { @@ -453,8 +453,8 @@ export class PetApi { }); } /** - * Update an existing pet * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ public updatePet (body?: Pet) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -502,8 +502,8 @@ export class PetApi { }); } /** - * Updates a pet in the store with form data * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -566,8 +566,8 @@ export class PetApi { }); } /** - * uploads an image * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -683,8 +683,8 @@ export class StoreApi { this.authentications.petstore_auth.accessToken = token; } /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ public deleteOrder (orderId: string) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -735,8 +735,8 @@ export class StoreApi { }); } /** - * Returns pet inventories by status * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ public getInventory () : Promise<{ response: http.ClientResponse; body: { [key: string]: number; }; }> { const localVarPath = this.basePath + '/store/inventory'; @@ -782,8 +782,8 @@ export class StoreApi { }); } /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ public getOrderById (orderId: string) : Promise<{ response: http.ClientResponse; body: Order; }> { @@ -834,8 +834,8 @@ export class StoreApi { }); } /** - * Place an order for a pet * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ public placeOrder (body?: Order) : Promise<{ response: http.ClientResponse; body: Order; }> { @@ -933,8 +933,8 @@ export class UserApi { this.authentications.petstore_auth.accessToken = token; } /** - * Create user * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ public createUser (body?: User) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -980,8 +980,8 @@ export class UserApi { }); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithArrayInput (body?: Array) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -1027,8 +1027,8 @@ export class UserApi { }); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithListInput (body?: Array) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -1074,8 +1074,8 @@ export class UserApi { }); } /** - * Delete user * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ public deleteUser (username: string) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -1126,8 +1126,8 @@ export class UserApi { }); } /** - * Get user by user name * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : Promise<{ response: http.ClientResponse; body: User; }> { @@ -1178,8 +1178,8 @@ export class UserApi { }); } /** - * Logs user into the system * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1233,8 +1233,8 @@ export class UserApi { }); } /** - * Logs out current logged in user session * + * @summary Logs out current logged in user session */ public logoutUser () : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/logout'; @@ -1278,8 +1278,8 @@ export class UserApi { }); } /** - * Updated user * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */ diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index 11e3a970e40..5b30eee14a6 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -187,8 +187,8 @@ export class PetApi { this.authentications.petstore_auth.accessToken = token; } /** - * Add a new pet to the store * + * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ public addPet (body?: Pet) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -236,8 +236,8 @@ export class PetApi { }); } /** - * Deletes a pet * + * @summary Deletes a pet * @param petId Pet id to delete * @param apiKey */ @@ -293,8 +293,8 @@ export class PetApi { }); } /** - * Finds Pets by status * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ public findPetsByStatus (status?: Array) : Promise<{ response: http.ClientResponse; body: Array; }> { @@ -345,8 +345,8 @@ export class PetApi { }); } /** - * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags * @param tags Tags to filter by */ public findPetsByTags (tags?: Array) : Promise<{ response: http.ClientResponse; body: Array; }> { @@ -397,8 +397,8 @@ export class PetApi { }); } /** - * Find pet by ID - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * @summary Find pet by ID * @param petId ID of pet that needs to be fetched */ public getPetById (petId: number) : Promise<{ response: http.ClientResponse; body: Pet; }> { @@ -453,8 +453,8 @@ export class PetApi { }); } /** - * Update an existing pet * + * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ public updatePet (body?: Pet) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -502,8 +502,8 @@ export class PetApi { }); } /** - * Updates a pet in the store with form data * + * @summary Updates a pet in the store with form data * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet @@ -566,8 +566,8 @@ export class PetApi { }); } /** - * uploads an image * + * @summary uploads an image * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload @@ -683,8 +683,8 @@ export class StoreApi { this.authentications.petstore_auth.accessToken = token; } /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ public deleteOrder (orderId: string) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -735,8 +735,8 @@ export class StoreApi { }); } /** - * Returns pet inventories by status * Returns a map of status codes to quantities + * @summary Returns pet inventories by status */ public getInventory () : Promise<{ response: http.ClientResponse; body: { [key: string]: number; }; }> { const localVarPath = this.basePath + '/store/inventory'; @@ -782,8 +782,8 @@ export class StoreApi { }); } /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ public getOrderById (orderId: string) : Promise<{ response: http.ClientResponse; body: Order; }> { @@ -834,8 +834,8 @@ export class StoreApi { }); } /** - * Place an order for a pet * + * @summary Place an order for a pet * @param body order placed for purchasing the pet */ public placeOrder (body?: Order) : Promise<{ response: http.ClientResponse; body: Order; }> { @@ -933,8 +933,8 @@ export class UserApi { this.authentications.petstore_auth.accessToken = token; } /** - * Create user * This can only be done by the logged in user. + * @summary Create user * @param body Created user object */ public createUser (body?: User) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -980,8 +980,8 @@ export class UserApi { }); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithArrayInput (body?: Array) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -1027,8 +1027,8 @@ export class UserApi { }); } /** - * Creates list of users with given input array * + * @summary Creates list of users with given input array * @param body List of user object */ public createUsersWithListInput (body?: Array) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -1074,8 +1074,8 @@ export class UserApi { }); } /** - * Delete user * This can only be done by the logged in user. + * @summary Delete user * @param username The name that needs to be deleted */ public deleteUser (username: string) : Promise<{ response: http.ClientResponse; body?: any; }> { @@ -1126,8 +1126,8 @@ export class UserApi { }); } /** - * Get user by user name * + * @summary Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : Promise<{ response: http.ClientResponse; body: User; }> { @@ -1178,8 +1178,8 @@ export class UserApi { }); } /** - * Logs user into the system * + * @summary Logs user into the system * @param username The user name for login * @param password The password for login in clear text */ @@ -1233,8 +1233,8 @@ export class UserApi { }); } /** - * Logs out current logged in user session * + * @summary Logs out current logged in user session */ public logoutUser () : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/logout'; @@ -1278,8 +1278,8 @@ export class UserApi { }); } /** - * Updated user * This can only be done by the logged in user. + * @summary Updated user * @param username name that need to be deleted * @param body Updated user object */