Current section
Files
Jump to
Current section
Files
README.md
# JValid
[](https://beta.hexfaktor.org/github/Nebo15/jvalid) [](https://hex.pm/packages/jvalid) [](https://hex.pm/packages/jvalid) [](https://hex.pm/packages/jvalid) [](https://travis-ci.org/Nebo15/jvalid) [](https://coveralls.io/github/Nebo15/jvalid?branch=master)
We use JSON Schema validation inside our projects, but storing large schema in Elixir files looks ugly, and you can't really move them to a separate file since it will be erased during compile and release.
This module solves this issue by in-lining schemas in compilation time via Elixir macros.
## Installation
It's [available in Hex](https://hex.pm/packages/jvalid), the package can be installed as:
1. Add `jvalid` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:jvalid, "~> 0.5.2"}]
end
```
2. Ensure `jvalid` is started before your application:
```elixir
def application do
[applications: [:jvalid]]
end
```