json_schema_rails 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +12 -0
- data/Gemfile +3 -10
- data/MIT-LICENSE +1 -1
- data/README.md +2 -0
- data/lib/generators/schema/action/templates/schema.yml.erb +11 -8
- data/lib/generators/schema/controller/templates/schema.yml.erb +11 -0
- data/lib/json_schema_rails/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8555812280bf51321d1ceeb834194e518a5110ad
|
4
|
+
data.tar.gz: 1b72b9abbb83f4100357bf431b4f5c4fea396f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f99d59ebe2901cab914b503445826427fcbc456b7d23a25ea7ffb606b3cd3d0ac7028cc1f5ca17154f63b9bc189b4212120cec6d1da1523619d73c0b92daaa1
|
7
|
+
data.tar.gz: 856c2b2a33faa7a4e0057cb203c48889bba9b1131e2e5a091ebc2d9676d699194781ccb1556d32a5990a4bbb3a3f94f99ff1e41fd62ddc9fe5146f0068dce3c2
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,14 +1,7 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
# Declare your gem's dependencies in json_schema_rails.gemspec.
|
4
|
-
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
-
# development dependencies will be added by default to the :development group.
|
6
3
|
gemspec
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
# your gem to rubygems.org.
|
12
|
-
|
13
|
-
# To use debugger
|
14
|
-
# gem 'debugger'
|
5
|
+
if ENV['RAILS_VERSION']
|
6
|
+
gem "rails", "= #{ENV['RAILS_VERSION']}"
|
7
|
+
end
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# json_schema_rails
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/kotas/json_schema_rails.svg?branch=master)](https://travis-ci.org/kotas/json_schema_rails) [![Code Climate](https://codeclimate.com/github/kotas/json_schema_rails.png)](https://codeclimate.com/github/kotas/json_schema_rails)
|
4
|
+
|
3
5
|
[JSON Schema v4](http://json-schema.org/) validator and generator for Rails 3+
|
4
6
|
|
5
7
|
## Installation
|
@@ -2,18 +2,21 @@
|
|
2
2
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
3
3
|
title: <%= schema_title %>
|
4
4
|
type: object
|
5
|
+
required:
|
6
|
+
- <%= file_name %>
|
5
7
|
properties:
|
6
8
|
<%= file_name %>:
|
7
9
|
type: object
|
10
|
+
additionalProperties: false
|
8
11
|
<%- if parameters.empty? -%>
|
9
|
-
required:
|
10
|
-
|
11
|
-
|
12
|
-
properties:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
# required:
|
13
|
+
# - param1
|
14
|
+
# - param2
|
15
|
+
# properties:
|
16
|
+
# param1:
|
17
|
+
# type: string
|
18
|
+
# param2:
|
19
|
+
# type: string
|
17
20
|
<%- else -%>
|
18
21
|
required:
|
19
22
|
<%- parameters.each do |param| -%>
|
@@ -2,6 +2,17 @@
|
|
2
2
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
3
3
|
title: <%= schema_title %>
|
4
4
|
type: object
|
5
|
+
required:
|
6
|
+
- <%= model_name %>
|
5
7
|
properties:
|
6
8
|
<%= model_name %>:
|
7
9
|
type: object
|
10
|
+
additionalProperties: false
|
11
|
+
# required:
|
12
|
+
# - param1
|
13
|
+
# - param2
|
14
|
+
# properties:
|
15
|
+
# param1:
|
16
|
+
# type: string
|
17
|
+
# param2:
|
18
|
+
# type: string
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_schema_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kota Saito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- ".editorconfig"
|
171
171
|
- ".gitignore"
|
172
172
|
- ".rspec"
|
173
|
+
- ".travis.yml"
|
173
174
|
- Gemfile
|
174
175
|
- Guardfile
|
175
176
|
- MIT-LICENSE
|