.github
cmd
kind
metaschemas
testdata
.gitmodules
.golangci.yml
.pre-commit-hooks.yaml
compiler_test.go
compiler.go
content.go
debug_test.go
draft_test.go
draft.go
example_http_test.go
example_regexp_test.go
example_test.go
example_vocab_bytecount_test.go
example_vocab_discriminator_test.go
example_vocab_openpapi_discriminator_test.go
example_vocab_uniquekeys_test.go
filepaths_test.go
format.go
go.mod
go.sum
go.work
go.work.sum
invalid_schemas_test.go
LICENSE
loader_test.go
loader.go
objcompiler.go
output_test.go
output.go
position.go
README.md
root.go
roots.go
schema.go
suite_test.go
util_test.go
util.go
validator_test.go
validator.go
vocab.go
jsonschema v6.0.3
see godoc for examples
Library Features
- pass JSON-Schema-Test-Suite excluding optional(compare with other impls at bowtie)
- detect infinite loop traps
-
$schemacycle - validation cycle
-
- custom
$schemaurl - vocabulary based validation
- custom regex engine
- format assertions
- flag to enable in draft >= 2019-09
- custom format registration
- built-in formats
- regex, uuid
- ipv4, ipv6
- hostname, email
- date, time, date-time, duration
- json-pointer, relative-json-pointer
- uri, uri-reference, uri-template
- iri, iri-reference
- period, semver
- content assertions
- flag to enable in draft >= 7
- contentEncoding
- base64
- custom
- contentMediaType
- application/json
- custom
- contentSchema
- errors
- introspectable
- hierarchy
- alternative display with
#
- alternative display with
- output
- flag
- basic
- detailed
- custom vocabulary
- enable via
$vocabularyfor draft >=2019-19 - enable via flag for draft <= 7
- enable via
- mixed dialect support
CLI v0.7.0
to install: go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest
Note that the cli is versioned independently. you can see it in git tags cmd/jv/v0.7.0
Usage: jv [OPTIONS] SCHEMA [INSTANCE...]
Options:
-c, --assert-content Enable content assertions with draft >= 7
-f, --assert-format Enable format assertions with draft >= 2019
--cacert pem-file Use the specified pem-file to verify the peer. The file may contain multiple CA certificates
-d, --draft version Draft version used when '$schema' is missing. Valid values 4, 6, 7, 2019, 2020 (default 2020)
-h, --help Print help information
-k, --insecure Use insecure TLS connection
-o, --output format Output format. Valid values simple, alt, flag, basic, detailed (default "simple")
-q, --quiet Do not print errors
-v, --version Print build information- exit code
1for validation errors,2for usage errors - validate both schema and multiple instances
- support both json and yaml files
- support standard input, use
- - quite mode with parsable output
- http(s) url support
- custom certs for validation, use
--cacert - flag to skip certificate verification, use
--insecure
- custom certs for validation, use