@@ -103,16 +103,17 @@ export class PetService {
103103
104104 /**
105105 * Add a new pet to the store
106- * @param body Pet object that needs to be added to the store
106+ *
107+ * @param pet Pet object that needs to be added to the store
107108 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
108109 * @param reportProgress flag to report request and response progress.
109110 */
110- public addPet ( body : Pet , observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < any > ;
111- public addPet ( body : Pet , observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < HttpResponse < any > > ;
112- public addPet ( body : Pet , observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < HttpEvent < any > > ;
113- public addPet ( body : Pet , observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < any > {
114- if ( body === null || body === undefined ) {
115- throw new Error ( 'Required parameter body was null or undefined when calling addPet.' ) ;
111+ public addPet ( pet : Pet , observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < Pet > ;
112+ public addPet ( pet : Pet , observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < HttpResponse < Pet > > ;
113+ public addPet ( pet : Pet , observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < HttpEvent < Pet > > ;
114+ public addPet ( pet : Pet , observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < any > {
115+ if ( pet === null || pet === undefined ) {
116+ throw new Error ( 'Required parameter pet was null or undefined when calling addPet.' ) ;
116117 }
117118
118119 let localVarHeaders = this . defaultHeaders ;
@@ -128,6 +129,8 @@ export class PetService {
128129 if ( localVarHttpHeaderAcceptSelected === undefined ) {
129130 // to determine the Accept header
130131 const httpHeaderAccepts : string [ ] = [
132+ 'application/xml' ,
133+ 'application/json'
131134 ] ;
132135 localVarHttpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ;
133136 }
@@ -162,8 +165,8 @@ export class PetService {
162165 }
163166 }
164167
165- return this . httpClient . post < any > ( `${ this . configuration . basePath } /pet` ,
166- body ,
168+ return this . httpClient . post < Pet > ( `${ this . configuration . basePath } /pet` ,
169+ pet ,
167170 {
168171 context : localVarHttpContext ,
169172 responseType : < any > responseType_ ,
@@ -177,6 +180,7 @@ export class PetService {
177180
178181 /**
179182 * Deletes a pet
183+ *
180184 * @param petId Pet id to delete
181185 * @param apiKey
182186 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@@ -457,16 +461,17 @@ export class PetService {
457461
458462 /**
459463 * Update an existing pet
460- * @param body Pet object that needs to be added to the store
464+ *
465+ * @param pet Pet object that needs to be added to the store
461466 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
462467 * @param reportProgress flag to report request and response progress.
463468 */
464- public updatePet ( body : Pet , observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < any > ;
465- public updatePet ( body : Pet , observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < HttpResponse < any > > ;
466- public updatePet ( body : Pet , observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < HttpEvent < any > > ;
467- public updatePet ( body : Pet , observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: undefined , context ?: HttpContext } ) : Observable < any > {
468- if ( body === null || body === undefined ) {
469- throw new Error ( 'Required parameter body was null or undefined when calling updatePet.' ) ;
469+ public updatePet ( pet : Pet , observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < Pet > ;
470+ public updatePet ( pet : Pet , observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < HttpResponse < Pet > > ;
471+ public updatePet ( pet : Pet , observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < HttpEvent < Pet > > ;
472+ public updatePet ( pet : Pet , observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: 'application/xml' | 'application/json' , context ?: HttpContext } ) : Observable < any > {
473+ if ( pet === null || pet === undefined ) {
474+ throw new Error ( 'Required parameter pet was null or undefined when calling updatePet.' ) ;
470475 }
471476
472477 let localVarHeaders = this . defaultHeaders ;
@@ -482,6 +487,8 @@ export class PetService {
482487 if ( localVarHttpHeaderAcceptSelected === undefined ) {
483488 // to determine the Accept header
484489 const httpHeaderAccepts : string [ ] = [
490+ 'application/xml' ,
491+ 'application/json'
485492 ] ;
486493 localVarHttpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ;
487494 }
@@ -516,8 +523,8 @@ export class PetService {
516523 }
517524 }
518525
519- return this . httpClient . put < any > ( `${ this . configuration . basePath } /pet` ,
520- body ,
526+ return this . httpClient . put < Pet > ( `${ this . configuration . basePath } /pet` ,
527+ pet ,
521528 {
522529 context : localVarHttpContext ,
523530 responseType : < any > responseType_ ,
@@ -531,6 +538,7 @@ export class PetService {
531538
532539 /**
533540 * Updates a pet in the store with form data
541+ *
534542 * @param petId ID of pet that needs to be updated
535543 * @param name Updated name of the pet
536544 * @param status Updated status of the pet
@@ -619,6 +627,7 @@ export class PetService {
619627
620628 /**
621629 * uploads an image
630+ *
622631 * @param petId ID of pet to update
623632 * @param additionalMetadata Additional data to pass to server
624633 * @param file file to upload
0 commit comments