grape-swagger-representable 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7843f1d937795abb96b6f88ffdf594f814679a1
4
- data.tar.gz: bc4baf2779a918e43fbaf5bafc7da590d4731291
3
+ metadata.gz: 4cc53d3a9f4691c61f82404cbb1bc1eb22244f15
4
+ data.tar.gz: a035996a8b63edd7ed75da0c228e1bb3317bbf1f
5
5
  SHA512:
6
- metadata.gz: 3b5f4e1a40b85663454abf5bb246d7d8e5f89719264f87ddc8c63b6ef1bb8dce8433ed05f225eb640f7ec8291f851571496ba7d0ad7f44af026f8ca3056f4d51
7
- data.tar.gz: 1ec6c429f2390e8d3f4028a38e064ffbac3190c31a8cb376b49d11e36817671baa93ea69212baa4fac44a6089afd1b94f8a06fe290fa5d732b646e837e2e6398
6
+ metadata.gz: 8d12ba65e634f56961439ad6c1f0846a1e98e13dcac097b94b3f9b6f241f6490ad5471f4cd40cb33a52b4907bac6c98f8cba9745be4f14deb4a251e10696863d
7
+ data.tar.gz: e29651950c2d4c52472719423ee3940ba9a5d6aa5d72ca242c5fb3e293a06375815b413e4def3daebc1bc90475adeda21f8b6e501e648f1cb6690ffc92d98583
@@ -104,6 +104,8 @@ module GrapeSwagger
104
104
  def parse_representer(representer)
105
105
  properties = representer.map.each_with_object({}) do |value, property|
106
106
  property_name = value[:as].try(:call) || value.name
107
+ hidden_property = value[:documentation]&.[](:hidden)
108
+ next if hidden_property && (hidden_property.is_a?(Proc) ? hidden_property.call : hidden_property)
107
109
  property[property_name] = parse_representer_property(value)
108
110
  end
109
111
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GrapeSwagger
4
4
  module Representable
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-representable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-01 00:00:00.000000000 Z
11
+ date: 2018-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-swagger