MCPcopy Index your code
hub / github.com/santhosh-tekuri/jsonschema

github.com/santhosh-tekuri/jsonschema @v6.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v6.0.2 ↗ · + Follow
492 symbols 1,278 edges 31 files 169 documented · 34% 189 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

jsonschema v6.0.2

License GoDoc Go Report Card Build Status codecov

see godoc for examples

Library Features

  • [x] pass JSON-Schema-Test-Suite excluding optional(compare with other impls at bowtie)
  • [x] draft-04
  • [x] draft-06
  • [x] draft-07
  • [x] draft/2019-09
  • [x] draft/2020-12
  • [x] detect infinite loop traps
  • [x] $schema cycle
  • [x] validation cycle
  • [x] custom $schema url
  • [x] vocabulary based validation
  • [x] custom regex engine
  • [x] format assertions
  • [x] flag to enable in draft >= 2019-09
  • [x] custom format registration
  • [x] built-in formats
    • [x] regex, uuid
    • [x] ipv4, ipv6
    • [x] hostname, email
    • [x] date, time, date-time, duration
    • [x] json-pointer, relative-json-pointer
    • [x] uri, uri-reference, uri-template
    • [x] iri, iri-reference
    • [x] period, semver
  • [x] content assertions
  • [x] flag to enable in draft >= 7
  • [x] contentEncoding
    • [x] base64
    • [x] custom
  • [x] contentMediaType
    • [x] application/json
    • [x] custom
  • [x] contentSchema
  • [x] errors
  • [x] introspectable
  • [x] hierarchy
    • [x] alternative display with #
  • [x] output
    • [x] flag
    • [x] basic
    • [x] detailed
  • [x] custom vocabulary
    • enable via $vocabulary for draft >=2019-19
    • enable via flag for draft <= 7
  • [x] 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
  • [x] exit code 1 for validation errors, 2 for usage errors
  • [x] validate both schema and multiple instances
  • [x] support both json and yaml files
  • [x] support standard input, use -
  • [x] quite mode with parsable output
  • [x] http(s) url support
  • [x] custom certs for validation, use --cacert
  • [x] flag to skip certificate verification, use --insecure

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 269
Function 108
Struct 92
TypeAlias 17
Interface 5
FuncType 1

Languages

Go100%

Modules by API surface

kind/kind.go121 symbols
util.go44 symbols
validator.go37 symbols
compiler.go29 symbols
objcompiler.go26 symbols
loader.go22 symbols
output.go20 symbols
draft.go19 symbols
roots.go18 symbols
format.go18 symbols
schema.go17 symbols
vocab.go15 symbols

For agents

$ claude mcp add jsonschema \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page