@@ -29,15 +29,6 @@ namespace API.Client {
29
29
}
30
30
}
31
31
32
- private extendObj < T1 , T2 > ( objA : T1 , objB : T2 ) {
33
- for ( let key in objB ) {
34
- if ( objB . hasOwnProperty ( key ) ) {
35
- objA [ key ] = objB [ key ] ;
36
- }
37
- }
38
- return < T1 & T2 > objA ;
39
- }
40
-
41
32
/**
42
33
* Add a new pet to the store
43
34
*
@@ -47,18 +38,17 @@ namespace API.Client {
47
38
const localVarPath = this . basePath + '/pet' ;
48
39
49
40
let queryParameters : any = { } ;
50
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
51
- let httpRequestParams : any = {
41
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
42
+ let httpRequestParams : ng . IRequestConfig = {
52
43
method : 'POST' ,
53
44
url : localVarPath ,
54
- json : true ,
55
45
data : body ,
56
46
params : queryParameters ,
57
47
headers : headerParams
58
48
} ;
59
49
60
50
if ( extraHttpRequestParams ) {
61
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
51
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
62
52
}
63
53
64
54
return this . $http ( httpRequestParams ) ;
@@ -74,23 +64,22 @@ namespace API.Client {
74
64
. replace ( '{' + 'petId' + '}' , String ( petId ) ) ;
75
65
76
66
let queryParameters : any = { } ;
77
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
67
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
78
68
// verify required parameter 'petId' is not null or undefined
79
69
if ( petId === null || petId === undefined ) {
80
70
throw new Error ( 'Required parameter petId was null or undefined when calling deletePet.' ) ;
81
71
}
82
72
headerParams [ 'api_key' ] = apiKey ;
83
73
84
- let httpRequestParams : any = {
74
+ let httpRequestParams : ng . IRequestConfig = {
85
75
method : 'DELETE' ,
86
76
url : localVarPath ,
87
- json : true ,
88
77
params : queryParameters ,
89
78
headers : headerParams
90
79
} ;
91
80
92
81
if ( extraHttpRequestParams ) {
93
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
82
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
94
83
}
95
84
96
85
return this . $http ( httpRequestParams ) ;
@@ -104,21 +93,20 @@ namespace API.Client {
104
93
const localVarPath = this . basePath + '/pet/findByStatus' ;
105
94
106
95
let queryParameters : any = { } ;
107
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
96
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
108
97
if ( status !== undefined ) {
109
98
queryParameters [ 'status' ] = status ;
110
99
}
111
100
112
- let httpRequestParams : any = {
101
+ let httpRequestParams : ng . IRequestConfig = {
113
102
method : 'GET' ,
114
103
url : localVarPath ,
115
- json : true ,
116
104
params : queryParameters ,
117
105
headers : headerParams
118
106
} ;
119
107
120
108
if ( extraHttpRequestParams ) {
121
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
109
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
122
110
}
123
111
124
112
return this . $http ( httpRequestParams ) ;
@@ -132,21 +120,20 @@ namespace API.Client {
132
120
const localVarPath = this . basePath + '/pet/findByTags' ;
133
121
134
122
let queryParameters : any = { } ;
135
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
123
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
136
124
if ( tags !== undefined ) {
137
125
queryParameters [ 'tags' ] = tags ;
138
126
}
139
127
140
- let httpRequestParams : any = {
128
+ let httpRequestParams : ng . IRequestConfig = {
141
129
method : 'GET' ,
142
130
url : localVarPath ,
143
- json : true ,
144
131
params : queryParameters ,
145
132
headers : headerParams
146
133
} ;
147
134
148
135
if ( extraHttpRequestParams ) {
149
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
136
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
150
137
}
151
138
152
139
return this . $http ( httpRequestParams ) ;
@@ -161,21 +148,20 @@ namespace API.Client {
161
148
. replace ( '{' + 'petId' + '}' , String ( petId ) ) ;
162
149
163
150
let queryParameters : any = { } ;
164
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
151
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
165
152
// verify required parameter 'petId' is not null or undefined
166
153
if ( petId === null || petId === undefined ) {
167
154
throw new Error ( 'Required parameter petId was null or undefined when calling getPetById.' ) ;
168
155
}
169
- let httpRequestParams : any = {
156
+ let httpRequestParams : ng . IRequestConfig = {
170
157
method : 'GET' ,
171
158
url : localVarPath ,
172
- json : true ,
173
159
params : queryParameters ,
174
160
headers : headerParams
175
161
} ;
176
162
177
163
if ( extraHttpRequestParams ) {
178
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
164
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
179
165
}
180
166
181
167
return this . $http ( httpRequestParams ) ;
@@ -189,18 +175,17 @@ namespace API.Client {
189
175
const localVarPath = this . basePath + '/pet' ;
190
176
191
177
let queryParameters : any = { } ;
192
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
193
- let httpRequestParams : any = {
178
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
179
+ let httpRequestParams : ng . IRequestConfig = {
194
180
method : 'PUT' ,
195
181
url : localVarPath ,
196
- json : true ,
197
182
data : body ,
198
183
params : queryParameters ,
199
184
headers : headerParams
200
185
} ;
201
186
202
187
if ( extraHttpRequestParams ) {
203
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
188
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
204
189
}
205
190
206
191
return this . $http ( httpRequestParams ) ;
@@ -217,7 +202,7 @@ namespace API.Client {
217
202
. replace ( '{' + 'petId' + '}' , String ( petId ) ) ;
218
203
219
204
let queryParameters : any = { } ;
220
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
205
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
221
206
let formParams : any = { } ;
222
207
223
208
// verify required parameter 'petId' is not null or undefined
@@ -230,17 +215,16 @@ namespace API.Client {
230
215
231
216
formParams [ 'status' ] = status ;
232
217
233
- let httpRequestParams : any = {
218
+ let httpRequestParams : ng . IRequestConfig = {
234
219
method : 'POST' ,
235
220
url : localVarPath ,
236
- json : false ,
237
221
data : this . $httpParamSerializer ( formParams ) ,
238
222
params : queryParameters ,
239
223
headers : headerParams
240
224
} ;
241
225
242
226
if ( extraHttpRequestParams ) {
243
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
227
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
244
228
}
245
229
246
230
return this . $http ( httpRequestParams ) ;
@@ -257,7 +241,7 @@ namespace API.Client {
257
241
. replace ( '{' + 'petId' + '}' , String ( petId ) ) ;
258
242
259
243
let queryParameters : any = { } ;
260
- let headerParams : any = this . extendObj ( { } , this . defaultHeaders ) ;
244
+ let headerParams : any = ( < any > Object ) . assign ( { } , this . defaultHeaders ) ;
261
245
let formParams : any = { } ;
262
246
263
247
// verify required parameter 'petId' is not null or undefined
@@ -270,17 +254,16 @@ namespace API.Client {
270
254
271
255
formParams [ 'file' ] = file ;
272
256
273
- let httpRequestParams : any = {
257
+ let httpRequestParams : ng . IRequestConfig = {
274
258
method : 'POST' ,
275
259
url : localVarPath ,
276
- json : false ,
277
260
data : this . $httpParamSerializer ( formParams ) ,
278
261
params : queryParameters ,
279
262
headers : headerParams
280
263
} ;
281
264
282
265
if ( extraHttpRequestParams ) {
283
- httpRequestParams = this . extendObj ( httpRequestParams , extraHttpRequestParams ) ;
266
+ httpRequestParams = ( < any > Object ) . assign ( httpRequestParams , extraHttpRequestParams ) ;
284
267
}
285
268
286
269
return this . $http ( httpRequestParams ) ;
0 commit comments