json_world 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/json_world/dsl.rb +6 -0
- data/lib/json_world/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d566b1f9bc9d32f2979c9e629244dc1c5131252
|
4
|
+
data.tar.gz: ac1806e0220c8c42eb30a390408e06f471c44ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c66833b2015116854e25b2ce04733fa16664cbe58731c925c64a95c954aee8ccf292b04ed2fe1250ba2d02be9a3429a01af6f8fa54620d6ef054f4c5be83fa48
|
7
|
+
data.tar.gz: 2a00605c40d2a2b258c10b9c50b5f8219bdc27789747b515b61e75da71a808539887a292b7887823532680bd5552312cd2c88d59ab2702e493a5f60fa8d14dc8
|
data/CHANGELOG.md
CHANGED
data/lib/json_world/dsl.rb
CHANGED
@@ -23,6 +23,7 @@ module JsonWorld
|
|
23
23
|
# @return [Hash]
|
24
24
|
def as_json_schema
|
25
25
|
{
|
26
|
+
'$schema': schema,
|
26
27
|
description: description,
|
27
28
|
links: links_as_json_schema,
|
28
29
|
properties: properties_as_json_schema,
|
@@ -120,6 +121,11 @@ module JsonWorld
|
|
120
121
|
def title(value = nil)
|
121
122
|
@title ||= value
|
122
123
|
end
|
124
|
+
|
125
|
+
# @return [String, nil]
|
126
|
+
def schema(value = nil)
|
127
|
+
@schema ||= value
|
128
|
+
end
|
123
129
|
end
|
124
130
|
end
|
125
131
|
end
|
data/lib/json_world/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_world
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -122,9 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.4.5
|
125
|
+
rubygems_version: 2.4.5.1
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Provides DSL to define JSON Schema representation of your class.
|
129
129
|
test_files: []
|
130
|
-
has_rdoc:
|