Skip to content

Commit 1fe98ef

Browse files
committed
fix: Auto-detect the version of the JSON Schema draft by default
1 parent 193a74f commit 1fe98ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ or process all `.json` files in a directory:
6060
-S, --single-quoted-strings support single quotes as string delimiters
6161
-V, --validate [file] JSON schema file to use for validation
6262
-e, --environment [env] which specification of JSON Schema the validation
63-
file uses (default: "json-schema-draft-03")
63+
file uses
6464
-q, --quiet do not print the parsed json to stdin
6565
-p, --pretty-print force pretty-printing even for invalid input
6666
-v, --version output the version number
6767
-h, --help output usage information
6868

6969
If no files or directories are specified, stdin will be parsed. Environments
7070
for JSON schema validation are "json-schema-draft-04", "json-schema-draft-06"
71-
or "json-schema-draft-07".
71+
or "json-schema-draft-07". If not specified, it will be auto-detected.
7272

7373
## Module Interface
7474

lib/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ var options = require('commander')
2424
.option('-C, --comments', 'recognize and ignore JavaScript-style comments')
2525
.option('-S, --single-quoted-strings', 'support single quotes as string delimiters')
2626
.option('-V, --validate [file]', 'JSON schema file to use for validation')
27-
.option('-e, --environment [env]', 'which specification of JSON Schema the validation file uses', 'json-schema-draft-03')
27+
.option('-e, --environment [env]', 'which specification of JSON Schema the validation file uses')
2828
.option('-q, --quiet', 'do not print the parsed json to stdin')
2929
.option('-p, --pretty-print', 'force pretty-printing even for invalid input')
3030
.version(pkg.version, '-v, --version')
3131
.on('--help', () => {
3232
console.log()
3333
console.log('If no files or directories are specified, stdin will be parsed. Environments')
3434
console.log('for JSON schema validation are "json-schema-draft-04", "json-schema-draft-06"')
35-
console.log('or "json-schema-draft-07".')
35+
console.log('or "json-schema-draft-07". If not specified, it will be auto-detected.')
3636
})
3737
.parse(process.argv)
3838

0 commit comments

Comments
 (0)