diff --git a/README.md b/README.md index 1886910c5..ceb3ebef6 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,9 @@ npm install openapi-typescript-codegen --save-dev ## Usage ``` -$ openapi --help +$ openapi-typescript-codegen --help - Usage: openapi [options] + Usage: openapi-typescript-codegen [options] Options: -V, --version output the version number @@ -68,8 +68,8 @@ $ openapi --help -h, --help display help for command Examples - $ openapi --input ./spec.json --output ./generated - $ openapi --input ./spec.json --output ./generated --client xhr + $ openapi-typescript-codegen --input ./spec.json --output ./generated + $ openapi-typescript-codegen --input ./spec.json --output ./generated --client xhr ``` Documentation diff --git a/bin/index.js b/bin/index.js index 32f2fecbc..980639a3d 100755 --- a/bin/index.js +++ b/bin/index.js @@ -7,7 +7,7 @@ const { program } = require('commander'); const pkg = require('../package.json'); const params = program - .name('openapi') + .name(pkg.name) .usage('[options]') .version(pkg.version) .requiredOption('-i, --input ', 'OpenAPI specification, can be a path, url or string content (required)') diff --git a/package-lock.json b/package-lock.json index 811cd7cc9..5c7ce82d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "handlebars": "^4.7.8" }, "bin": { - "openapi": "bin/index.js" + "openapi-typescript-codegen": "bin/index.js" }, "devDependencies": { "@angular-devkit/build-angular": "18.2.5", diff --git a/package.json b/package.json index 94d8ddea5..22cc76280 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "main": "dist/index.js", "types": "types/index.d.ts", "bin": { - "openapi": "bin/index.js" + "openapi-typescript-codegen": "bin/index.js" }, "files": [ "bin/index.js",