@justingorham/tsjsvg
v2.1.1
Published
Typescript json schema and validator generator
Downloads
2
Maintainers
Readme
@justingorham/tsjsvg
Typescript json schema and validator generator
Usage
$ npm install -g @justingorham/tsjsvg
$ tsjsvg COMMAND
running command...
$ tsjsvg (-v|--version|version)
@justingorham/tsjsvg/2.1.1 win32-x64 node-v14.15.3
$ tsjsvg --help [COMMAND]
USAGE
$ tsjsvg COMMAND
...
Commands
tsjsvg generate
generate schema and validator
USAGE
$ tsjsvg generate
OPTIONS
-f, --fileName=fileName Name of the generated file
-h, --help show CLI help
-p, --path=path The path to the TypeScript source file.
--defaultsVarName=defaultsVarName [default: defaults] export to set default validator
--definitionKeysTypeName=definitionKeysTypeName [default: DefinitionKeys] exported definition keys type name
--modelValidatorClassName=modelValidatorClassName [default: ModelValidator] name of the exported validator class
--schemaVarName=schemaVarName [default: schema] exported name of the generated JSON schema
EXAMPLE
$ tsjsvg generate -p src/models/**/*.ts -f src/model-validator.ts
See code: src/commands/generate.ts
tsjsvg help [COMMAND]
display help for tsjsvg
USAGE
$ tsjsvg help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
tsjsvg generate
generate schema and validator
USAGE
$ tsjsvg generate
OPTIONS
-f, --fileName=fileName Name of the generated file
-h, --help show CLI help
-p, --path=path The path to the TypeScript source file.
--defaultsVarName=defaultsVarName [default: defaults] export to set default validator
--definitionKeysTypeName=definitionKeysTypeName [default: DefinitionKeys] exported definition keys type name
--modelValidatorClassName=modelValidatorClassName [default: ModelValidator] name of the exported validator class
--schemaVarName=schemaVarName [default: schema] exported name of the generated JSON schema
EXAMPLE
$ tsjsvg generate -p src/models/**/*.ts -f src/model-validator.ts
See code: src\commands\generate.ts
tsjsvg help [COMMAND]
display help for tsjsvg
USAGE
$ tsjsvg help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help