acacode/swagger-typescript-api

Error: Unknown command https://theurl.tld

Closed this issue · 1 comments

After updating from version 13.0.23 to 13.0.26, we get an error when running the following command:
npx swagger-typescript-api -p http://localhost:5221/swagger/v1/swagger.json -o src/api -t ./apitemplates/ -n DotnetApi

The error:

> npx swagger-typescript-api -p http://localhost:5221/swagger/v1/swagger.json -o src/api -t ./apitemplates/ -n DotnetApi

Generate the API client for Fetch or Axios from an OpenAPI Specification (swagger-typescript-api v13.0.25)                                                                                                               10:57:25

USAGE swagger-typescript-api generate|generate-templates

COMMANDS

            generate    Generate the API client for Fetch or Axios from an OpenAPI Specification
  generate-templates    Generate ".ejs" templates needed for generate api

Use swagger-typescript-api <command> --help for more information about a command.


 ERROR  Unknown command http://localhost:5221/swagger/v1/swagger.json      

It works fine in version 13.0.23 and earlier.

We've made the subcommand required, so you now need to specify either generate or generate-templates.