astahmer / openapi-zod-client

Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)
openapi-zod-client.vercel.app
717 stars 80 forks source link

Add cli option to limit the code generation to specific tags or paths #292

Open ctot-nondef opened 2 months ago

ctot-nondef commented 2 months ago

as some swagger definitions are quite large, the resulting API-clients can be very large and as such hard to handle by IDEs/language servers. the autocomplete for types turns laggy.

as in many scenarios only a specific set of operations is actually used, it would be great if there was a cli-option to select the operations needed either by passing a (list of) tag(s) or by passing a (list of) operationId(s) like so:

Options:
  --operationIds <operationId1,operationId2>               A comma separated list of operationIds the client generation will be limited to
  --tags <tag1,tag2>                                       A comma separated list of tags the client generation will be limited to