v3.0.0
Features
Usage
$ create-validator-ts [file|glob*]
Options
--watch [Boolean] If set the flag, start watch mode
--check [Boolean] If set the flag, start test mode
--cwd [Path:String] current working directory
--tsconfigFilePath [Path:String] path to tsconfig.json
--generatorScript [Path:String] A JavaScript file path that customize validator code generator
--verbose [Boolean] If set the flag, show progressing logs
ts-json-schema-generator options
--sortProps [Boolean] Enable sortProps
--no-sortProps
--strictTuples [Boolean] Enable strictTuples
--no-strictTuples
--encodeRefs [Boolean] Enable encodeRefs
--no-encodeRefs
--skipTypeCheck [Boolean] Enable skipTypeCheck. true by default
--no-skipTypeCheck
--additionalProperties [Boolean] Enable additionalProperties. false by default
--no-additionalProperties
Examples
$ create-validator-ts "src/**/api-types.ts"
# custom tsconfig.json
$ create-validator-ts "src/**/api-types.ts" --tsconfigFilePath ./tsconfig.app.json
# custom validator code
$ create-validator-ts "src/**/api-types.ts" --generatorScript ./custom.js
It is breaking change. new default generator is here.
It aim to improve error messages by default.
- Invalid XXX
+ Invalid XXX: <details of schema error>Custom generator script user is not affected this change.