/json-schema-rails-engine

A mountable Rails engine for JsonSchema modelling and validation

Primary LanguageRubyMIT LicenseMIT

Json Schema Rails Engine

This is a mountable Rails engine aiming to provide the ability to model Json Schema objects and provide a source to load those schemas by id and reference.

Eventually, there's going to be validation in there, too.

Eventually.

Currently, only tested against Postgresql

Installation

Add this line to your application's Gemfile:

gem "json_schema", github: "kryptykphysh/json-schema-rails-engine", branch: "schemas"

Note: This is still very much in development

And then execute:

$ bundle

Edit your config/routes.rb file to mount the engine at the desired endpoint:

mount JsonSchema::Engine, at: "/json_schema"

Database Migrations

Copy the migrations from the engine in to your application.

bundle exec rails json_schema:install:migrations

Then, migrate as normal:

./bin/rails db:migrate

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.