Miss any of our Open RFC calls?Watch the recordings here! »

@justingorham/tsjsvg

2.1.0 • Public • Published

@justingorham/tsjsvg

Typescript json schema and validator generator

oclif Version Downloads/week License

Usage

$ npm install -g @justingorham/tsjsvg
$ tsjsvg COMMAND
running command...
$ tsjsvg (-v|--version|version)
@justingorham/tsjsvg/2.1.0 win32-x64 node-v12.16.1
$ 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

Install

npm i @justingorham/tsjsvg

DownloadsWeekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

16.4 kB

Total Files

17

Last publish

Collaborators

  • avatar