-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Description
Description
I would like the TypeScript code generator to support "CollectParameters" extension, which tells generated methods to accept all parameters as a single object / option-bag instead of multiple, positional arguments.
This extension is described here:
https://blog.apimatic.io/swagger-2-0-extension-for-code-generation-settings-abf602c3869d
openapi-generator version
3.2.1
OpenAPI declaration file content or url
paths:
/favorites:
get:
operationId: GetFavorites
x-operation-settings:
CollectParameters: true
parameters:
- in: query
name: account_id
type: string
- in: query
name: user_id
type: string
responses:
'200':
description: '200'
schema:
$ref: '#/definitions/Favorites'CollectParameters: true should generate client methods that accept an option-bag of params.
await client.getFavorites({account_id: '123', user_id: '456'});Related issues/PRs
macjohnny, thril, RayMcCl, StefanKern, Trojaner and 10 more