Skip to content

Commit 89cdea6

Browse files
author
svolkov
committed
docs: add description to cli --help block
1 parent f5ba2f0 commit 89cdea6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Usage: swagger-typescript-api [options]
2828
2929
Options:
3030
-v, --version output the current version
31-
-p, --path <path> path to swagger scheme
31+
-p, --path <path> path/url to swagger scheme
3232
-o, --output <output> output path of typescript api file (default: ".")
3333
-n, --name <name> name of output typescript api file (default: "api.ts")
3434
-h, --help output usage information

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const { version } = require('./package.json');
1313

1414
program
1515
.version(version, '-v, --version', 'output the current version')
16-
.requiredOption('-p, --path <path>', 'path to swagger scheme')
16+
.description("Generate api via swagger scheme.\nSupports OA 3.0, 2.0, JSON, yaml.")
17+
.requiredOption('-p, --path <path>', 'path/url to swagger scheme')
1718
.option('-o, --output <output>', 'output path of typescript api file', '.')
1819
.option('-n, --name <name>', 'name of output typescript api file', 'api.ts');
1920

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Create typescript api module from swagger schema",
55
"scripts": {
66
"cli": "node index.js -p ./tests/schemas/v3.0/personal-api-example.json -o ./tests/generated/v3.0/ -n personal-api-example.ts",
7+
"cli:help": "node index.js -h",
78
"generate": "node tests/generate.js",
89
"generate:debug": "node --nolazy --inspect-brk=9229 tests/generate.js",
910
"validate": "node tests/validate.js"

0 commit comments

Comments
 (0)