Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/salesking/json_schema_builder
Build JSON Schema for ActiveRecord models
https://github.com/salesking/json_schema_builder
Last synced: about 2 months ago
JSON representation
Build JSON Schema for ActiveRecord models
- Host: GitHub
- URL: https://github.com/salesking/json_schema_builder
- Owner: salesking
- Created: 2012-05-13T23:18:07.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-12T11:12:07.000Z (almost 9 years ago)
- Last Synced: 2024-03-25T23:09:33.926Z (9 months ago)
- Language: Ruby
- Size: 22.5 KB
- Stars: 22
- Watchers: 3
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JSON Schema Builder
[![Build Status](https://travis-ci.org/salesking/json_schema_builder.svg)](https://travis-ci.org/salesking/json_schema_builder)
Build a JSON schema for your ActiveRecord models. STOP your API pains!
The created schema.json files are meant as stubs and need to be enriched with
field descriptions and names. You might also want to remove or add object
properties, since the gem only uses the available ActiveRecord database fields.## Usage
Hook the gem into your rails app and create the schema files.
rake re
gem 'json_schema_builder'
rake schema:buildYour Models and their fields are written into JSON files which you can
pimp further.## Supports
* ruby 1.9, 2.2
* active_record > 4 (use gem version < 0.1.0 for older versions)## Test
bundle install
bundle exec rake spec## Contribute
Feel free to fork and add features or fixes for other ActiveRecord versions
Copyright Georg Leciejewski, MIT License