json_world 0.2.2 → 0.2.3
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/link_definition.rb +11 -0
- data/lib/json_world/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b56b307c4758732de7859e29486dda4220e9aa
|
4
|
+
data.tar.gz: 4e517e903417601c1a0bd00b85bea8ac7b57115d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f28e1be23b4808aba464c37d0571c4522a631e1760bbab777ab6cb55dd8bbd8a48653d19bed85c3e855ab236a312a02b8719d0c3ae70f77a1a40f9195a37f7c7
|
7
|
+
data.tar.gz: 6490379be8b89de6e77d3a336c52004ed07d86b6962d1a71ee29604a3b5ece590b82ecf9273b40938758f7da89f45c65944bebd3804f405b8c69879d192febf2
|
data/CHANGELOG.md
CHANGED
@@ -22,6 +22,7 @@ module JsonWorld
|
|
22
22
|
method: http_method,
|
23
23
|
rel: rel,
|
24
24
|
schema: schema,
|
25
|
+
targetSchema: target_schema,
|
25
26
|
title: title,
|
26
27
|
}.reject do |_key, value|
|
27
28
|
value.nil? || value.empty?
|
@@ -66,6 +67,16 @@ module JsonWorld
|
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
70
|
+
# @return [Hash{Symbol => Object}, nil]
|
71
|
+
def target_schema
|
72
|
+
if @options[:target_schema]
|
73
|
+
JsonWorld::PropertyDefinition.new(
|
74
|
+
properties: @options[:target_schema],
|
75
|
+
property_name: :targetSchema,
|
76
|
+
).as_json_schema
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
69
80
|
# @return [String]
|
70
81
|
def title
|
71
82
|
@options[:title] || @link_name.to_s
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|