Skip to content
A JSON Schema validator.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bench
config
docs
lib
test
.credo.exs
.formatter.exs
.gitignore
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
LICENSE
README.md
coveralls.json
dialyzer.ignore-warnings
mix.exs
mix.lock

README.md

JsonXema

Build Status Coverage Status Hex.pm License: MIT

JsonXema is a JSON Schema validator with support for draft 04, 06, and 07.

JsonXema based on elixir schema validator Xema.

JsonXema is in early beta. If you try it and has an issue, report them.

Installation

If available in Hex, the package can be installed like this:

First, add JsonXema to your mix.exs dependencies:

def deps do
  [
    {:json_xema, "~> 0.1"}
  ]
end

Then, update your dependencies:

$ mix deps.get

Docs

The docs contains a Usage page with a short and compact description to use JsonXema.

A loader must be configured to support remote schemas. The documentation contains a description on page Configure a loader.

Documentation can be generated with ExDoc by running mix docs. The generated docs can be found at https://hexdocs.pm/json_xema.

Tests

Tests in test/json_xema are not organised as classic unit tests but are related to JSON schema keywords or a specific feature.

The directory test/suite contains tests for draft 04, 06, and 07 and are generated from the Json Schema Test Suite.

Benchmark

A benchmark test can be started with mix bench. More about the benchmark can be found at bench.

References

The home of JSON Schema: http://json-schema.org/

Specification:

Understanding JSON Schema a great tutorial for JSON Schema authors.

You can’t perform that action at this time.