https://github.com/nebo15/jvalid
Json Scheme validation helper, that allows to store schemes in a separate files.
https://github.com/nebo15/jvalid
elixir hex package validation
Last synced: 11 months ago
JSON representation
Json Scheme validation helper, that allows to store schemes in a separate files.
- Host: GitHub
- URL: https://github.com/nebo15/jvalid
- Owner: Nebo15
- License: mit
- Created: 2016-08-23T19:12:12.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-25T13:32:22.000Z (over 6 years ago)
- Last Synced: 2025-03-26T23:11:42.602Z (about 1 year ago)
- Topics: elixir, hex, package, validation
- Language: Elixir
- Size: 27.3 KB
- Stars: 8
- Watchers: 7
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
```