Generate API client using the CLI
mainYou can generate an API client from an OpenAPI specification (OpenAPI 3.0, 2.0, JSON, or YAML) using the command line interface. You can run it directly via npx or install it as a dev dependency in your project.
# Run without installing
npx swagger-typescript-api generate --path ./swagger.json
# Or install locally first
npm install --save-dev swagger-typescript-api
npx swagger-typescript-api generate --path ./swagger.json