From d9ed238ccc09c838d2d410848551312ac01a1946 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sat, 15 Jul 2017 03:04:40 +0800 Subject: [PATCH] update ts fetch samples --- .../typescript-fetch/builds/default/api.ts | 44 ++++--------------- .../typescript-fetch/builds/es6-target/api.ts | 44 ++++--------------- .../builds/with-npm-version/api.ts | 16 +++---- 3 files changed, 24 insertions(+), 80 deletions(-) diff --git a/samples/client/petstore/typescript-fetch/builds/default/api.ts b/samples/client/petstore/typescript-fetch/builds/default/api.ts index 4dda98a7489..ffd2fc8eccf 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/api.ts @@ -256,17 +256,10 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs { // verify required parameter "petId" is set @@ -482,17 +475,10 @@ export const PetApiFp = { }); }; }, -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise { const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options); @@ -600,17 +586,10 @@ export class PetApi extends BaseAPI { findPetsByTags(params: { tags: Array; }, options: any = {}) { return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath); } -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, options: any = {}) { return PetApiFp.getPetById(params, this.configuration, options)(this.fetch, this.basePath); @@ -683,17 +662,10 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { findPetsByTags(params: { tags: Array; }, configuration: Configuration, options: any = {}) { return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath); }, -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) { return PetApiFp.getPetById(params, configuration, options)(fetch, basePath); 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 34fe19527f4..80e62124cfe 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts @@ -255,17 +255,10 @@ export const PetApiFetchParamCreator = { options: fetchOptions, }; }, -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs { // verify required parameter "petId" is set @@ -481,17 +474,10 @@ export const PetApiFp = { }); }; }, -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise { const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options); @@ -599,17 +585,10 @@ export class PetApi extends BaseAPI { findPetsByTags(params: { tags: Array; }, options: any = {}) { return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath); } -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, options: any = {}) { return PetApiFp.getPetById(params, this.configuration, options)(this.fetch, this.basePath); @@ -682,17 +661,10 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { findPetsByTags(params: { tags: Array; }, configuration: Configuration, options: any = {}) { return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath); }, -<<<<<<< HEAD - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return -======= /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched ->>>>>>> origin/master + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) { return PetApiFp.getPetById(params, configuration, options)(fetch, basePath); 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 687baf11bba..ffd2fc8eccf 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 @@ -257,9 +257,9 @@ export const PetApiFetchParamCreator = { }; }, /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs { // verify required parameter "petId" is set @@ -476,9 +476,9 @@ export const PetApiFp = { }; }, /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise { const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options); @@ -587,9 +587,9 @@ export class PetApi extends BaseAPI { return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath); } /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, options: any = {}) { return PetApiFp.getPetById(params, this.configuration, options)(this.fetch, this.basePath); @@ -663,9 +663,9 @@ export const PetApiFactory = function (fetch?: FetchAPI, basePath?: string) { return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath); }, /** - * Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions + * Returns a single pet * @summary Find pet by ID - * @param petId ID of pet that needs to be fetched + * @param petId ID of pet to return */ getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) { return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);