Description
Issue
When you run a command like swagger-typescript-api generate-templates --output ./templates
the console will output this:
> swagger-typescript-api generate-templates --output ./templates
Generate ".ejs" templates needed for generate api (swagger-typescript-api generate-templates v13.1.3) 5:33:27 PM
USAGE swagger-typescript-api generate-templates [OPTIONS] -o, --output
OPTIONS
--clean-output clean output folder before generate template. WARNING: May cause data loss
--debug additional information about processes inside this tool
--http-client="fetch" http client type (possible values: fetch,axios)
--modular generate templates needed to separate files for http client, data contracts, and routes
-o, --output (required) output path of generated templates
-r, --rewrite rewrite content in existing templates
--silent Output only errors to console
ERROR Missing required argument: --path
But path
is not an argument for generate-templates
.
If you add path
pointing to a swagger json file the content inside the generated templates
folder will include Api.ts
too.
The problem
I guess when you set the run
and args
in a root defineCommand
from citty
they will be always validated and executed. If I comment these two props in the cli.js file I find in my node_modules it works properly.