json_world 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b0508d62a6902dbc3a68081efbf41d1344b2e2c
4
- data.tar.gz: b1e03953c88d563f7aa3231fd45eb7f370dd35d8
3
+ metadata.gz: b7b56b307c4758732de7859e29486dda4220e9aa
4
+ data.tar.gz: 4e517e903417601c1a0bd00b85bea8ac7b57115d
5
5
  SHA512:
6
- metadata.gz: d817d7e58d363acaaaa2f5716b8c6d12f8362ea3c74feb94a905de93cdd520f66a21a2beb97ce2ba1ed9ed8a5eadf1953c543f2da4c3258bb21d20fef3b97ec6
7
- data.tar.gz: 98297fc2cb1ad9b2ab19b8dfda0088c82bdd98d52263817e1d87b52030708ac53aed2d8b66df86672d1cb4397cadf623fb0f9ebf75f1dc97fb77d19decc125ca
6
+ metadata.gz: f28e1be23b4808aba464c37d0571c4522a631e1760bbab777ab6cb55dd8bbd8a48653d19bed85c3e855ab236a312a02b8719d0c3ae70f77a1a40f9195a37f7c7
7
+ data.tar.gz: 6490379be8b89de6e77d3a336c52004ed07d86b6962d1a71ee29604a3b5ece590b82ecf9273b40938758f7da89f45c65944bebd3804f405b8c69879d192febf2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.3
2
+ - Add :target_schema option on link definition
3
+
1
4
  ## 0.2.2
2
5
  - Support :media_type option on link definition
3
6
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module JsonWorld
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
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.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: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2016-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport