forked from loafle/openapi-generator-original
update ts fetch samples
This commit is contained in:
parent
f987c93a71
commit
d9ed238ccc
@ -256,17 +256,10 @@ export const PetApiFetchParamCreator = {
|
|||||||
options: fetchOptions,
|
options: fetchOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs {
|
||||||
// verify required parameter "petId" is set
|
// verify required parameter "petId" is set
|
||||||
@ -482,17 +475,10 @@ export const PetApiFp = {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise<Pet> {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise<Pet> {
|
||||||
const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options);
|
const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options);
|
||||||
@ -600,17 +586,10 @@ export class PetApi extends BaseAPI {
|
|||||||
findPetsByTags(params: { tags: Array<string>; }, options: any = {}) {
|
findPetsByTags(params: { tags: Array<string>; }, options: any = {}) {
|
||||||
return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath);
|
return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, options: any = {}) {
|
getPetById(params: { petId: number; }, options: any = {}) {
|
||||||
return PetApiFp.getPetById(params, this.configuration, options)(this.fetch, this.basePath);
|
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<string>; }, configuration: Configuration, options: any = {}) {
|
findPetsByTags(params: { tags: Array<string>; }, configuration: Configuration, options: any = {}) {
|
||||||
return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath);
|
return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath);
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) {
|
||||||
return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);
|
return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);
|
||||||
|
@ -255,17 +255,10 @@ export const PetApiFetchParamCreator = {
|
|||||||
options: fetchOptions,
|
options: fetchOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs {
|
||||||
// verify required parameter "petId" is set
|
// verify required parameter "petId" is set
|
||||||
@ -481,17 +474,10 @@ export const PetApiFp = {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise<Pet> {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise<Pet> {
|
||||||
const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options);
|
const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options);
|
||||||
@ -599,17 +585,10 @@ export class PetApi extends BaseAPI {
|
|||||||
findPetsByTags(params: { tags: Array<string>; }, options: any = {}) {
|
findPetsByTags(params: { tags: Array<string>; }, options: any = {}) {
|
||||||
return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath);
|
return PetApiFp.findPetsByTags(params, this.configuration, options)(this.fetch, this.basePath);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, options: any = {}) {
|
getPetById(params: { petId: number; }, options: any = {}) {
|
||||||
return PetApiFp.getPetById(params, this.configuration, options)(this.fetch, this.basePath);
|
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<string>; }, configuration: Configuration, options: any = {}) {
|
findPetsByTags(params: { tags: Array<string>; }, configuration: Configuration, options: any = {}) {
|
||||||
return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath);
|
return PetApiFp.findPetsByTags(params, configuration, options)(fetch, basePath);
|
||||||
},
|
},
|
||||||
<<<<<<< HEAD
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
|
||||||
* Returns a single pet
|
* 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
|
|
||||||
* @summary Find pet by ID
|
* @summary Find pet by ID
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
>>>>>>> origin/master
|
|
||||||
*/
|
*/
|
||||||
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) {
|
||||||
return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);
|
return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);
|
||||||
|
@ -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
|
* @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 {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): FetchArgs {
|
||||||
// verify required parameter "petId" is set
|
// 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
|
* @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<Pet> {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}): (fetch: FetchAPI, basePath?: string) => Promise<Pet> {
|
||||||
const fetchArgs = PetApiFetchParamCreator.getPetById(params, configuration, options);
|
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);
|
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
|
* @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 = {}) {
|
getPetById(params: { petId: number; }, options: any = {}) {
|
||||||
return PetApiFp.getPetById(params, this.configuration, options)(this.fetch, this.basePath);
|
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);
|
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
|
* @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 = {}) {
|
getPetById(params: { petId: number; }, configuration: Configuration, options: any = {}) {
|
||||||
return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);
|
return PetApiFp.getPetById(params, configuration, options)(fetch, basePath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user