Skip to content

Commit a043ebf

Browse files
authored
Merge pull request #10166 from swagger-api/typescript-node-CVE-2020-7598
typescript-node minimist ^1.2.5 - fixes CVE-2020-7598
2 parents 1ebde9c + 9196bc0 commit a043ebf

File tree

7 files changed

+99
-49
lines changed

7 files changed

+99
-49
lines changed

modules/swagger-codegen/src/main/resources/typescript-node/package.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"@types/request": "*"
2020
},
2121
"devDependencies": {
22-
"typescript": "^2.4.2"
22+
"typescript": "^2.4.2",
23+
"minimist": "^1.2.5"
2324
}{{#npmRepository}},
2425
"publishConfig":{
2526
"registry":"{{npmRepository}}"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.3-SNAPSHOT
1+
2.4.14-SNAPSHOT

samples/client/petstore/typescript-node/npm/api.d.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -193,35 +193,35 @@ export declare class PetApi {
193193
setDefaultAuthentication(auth: Authentication): void;
194194
setApiKey(key: PetApiApiKeys, value: string): void;
195195
accessToken: string;
196-
addPet(body: Pet): Promise<{
196+
addPet(body: Pet, options?: any): Promise<{
197197
response: http.ClientResponse;
198198
body?: any;
199199
}>;
200-
deletePet(petId: number, apiKey?: string): Promise<{
200+
deletePet(petId: number, apiKey?: string, options?: any): Promise<{
201201
response: http.ClientResponse;
202202
body?: any;
203203
}>;
204-
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>): Promise<{
204+
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<{
205205
response: http.ClientResponse;
206206
body: Array<Pet>;
207207
}>;
208-
findPetsByTags(tags: Array<string>): Promise<{
208+
findPetsByTags(tags: Array<string>, options?: any): Promise<{
209209
response: http.ClientResponse;
210210
body: Array<Pet>;
211211
}>;
212-
getPetById(petId: number): Promise<{
212+
getPetById(petId: number, options?: any): Promise<{
213213
response: http.ClientResponse;
214214
body: Pet;
215215
}>;
216-
updatePet(body: Pet): Promise<{
216+
updatePet(body: Pet, options?: any): Promise<{
217217
response: http.ClientResponse;
218218
body?: any;
219219
}>;
220-
updatePetWithForm(petId: number, name?: string, status?: string): Promise<{
220+
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<{
221221
response: http.ClientResponse;
222222
body?: any;
223223
}>;
224-
uploadFile(petId: number, additionalMetadata?: string, file?: Buffer): Promise<{
224+
uploadFile(petId: number, additionalMetadata?: string, file?: Buffer, options?: any): Promise<{
225225
response: http.ClientResponse;
226226
body: ApiResponse;
227227
}>;
@@ -244,21 +244,21 @@ export declare class StoreApi {
244244
setDefaultAuthentication(auth: Authentication): void;
245245
setApiKey(key: StoreApiApiKeys, value: string): void;
246246
accessToken: string;
247-
deleteOrder(orderId: string): Promise<{
247+
deleteOrder(orderId: string, options?: any): Promise<{
248248
response: http.ClientResponse;
249249
body?: any;
250250
}>;
251-
getInventory(): Promise<{
251+
getInventory(options?: any): Promise<{
252252
response: http.ClientResponse;
253253
body: {
254254
[key: string]: number;
255255
};
256256
}>;
257-
getOrderById(orderId: number): Promise<{
257+
getOrderById(orderId: number, options?: any): Promise<{
258258
response: http.ClientResponse;
259259
body: Order;
260260
}>;
261-
placeOrder(body: Order): Promise<{
261+
placeOrder(body: Order, options?: any): Promise<{
262262
response: http.ClientResponse;
263263
body: Order;
264264
}>;
@@ -281,35 +281,35 @@ export declare class UserApi {
281281
setDefaultAuthentication(auth: Authentication): void;
282282
setApiKey(key: UserApiApiKeys, value: string): void;
283283
accessToken: string;
284-
createUser(body: User): Promise<{
284+
createUser(body: User, options?: any): Promise<{
285285
response: http.ClientResponse;
286286
body?: any;
287287
}>;
288-
createUsersWithArrayInput(body: Array<User>): Promise<{
288+
createUsersWithArrayInput(body: Array<User>, options?: any): Promise<{
289289
response: http.ClientResponse;
290290
body?: any;
291291
}>;
292-
createUsersWithListInput(body: Array<User>): Promise<{
292+
createUsersWithListInput(body: Array<User>, options?: any): Promise<{
293293
response: http.ClientResponse;
294294
body?: any;
295295
}>;
296-
deleteUser(username: string): Promise<{
296+
deleteUser(username: string, options?: any): Promise<{
297297
response: http.ClientResponse;
298298
body?: any;
299299
}>;
300-
getUserByName(username: string): Promise<{
300+
getUserByName(username: string, options?: any): Promise<{
301301
response: http.ClientResponse;
302302
body: User;
303303
}>;
304-
loginUser(username: string, password: string): Promise<{
304+
loginUser(username: string, password: string, options?: any): Promise<{
305305
response: http.ClientResponse;
306306
body: string;
307307
}>;
308-
logoutUser(): Promise<{
308+
logoutUser(options?: any): Promise<{
309309
response: http.ClientResponse;
310310
body?: any;
311311
}>;
312-
updateUser(username: string, body: User): Promise<{
312+
updateUser(username: string, body: User, options?: any): Promise<{
313313
response: http.ClientResponse;
314314
body?: any;
315315
}>;

0 commit comments

Comments
 (0)