dry-swagger 0.4.1 → 0.4.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
  SHA256:
3
- metadata.gz: 76187fb16daf0690d5cea5b3725d6c0a50ea8a69fa5172557e233c4832ab776d
4
- data.tar.gz: 8c0c9bd3ba2574e8f6b081cf7248b85f03ce12cc0240cf08bce6e09962eaf067
3
+ metadata.gz: b13a0cda4f7abf7bc7e5438b5b4be9e91f2a06f46abc38d431ce8f6df9ba20ed
4
+ data.tar.gz: 7d3d42835269384bd81df3a687528e23a125bdbb40a30d54b34d0c517fbe5993
5
5
  SHA512:
6
- metadata.gz: fc5e7e55e448a6964f12038de02d5f3b90c16cb7d950c3154dbe3df863cc3c14f76838c556ac8c538a3da50ed5f62b30b0266a5da3d3f8d83ce44546d8f18cd2
7
- data.tar.gz: 0e3cc570dda791eaed872f7ea98f2404b16c80cbe73caadfdfd6e1e68bbdec576e339c839e70454fafa99757d2e57f4c81493be3514e0555ad079e611fc7dafd
6
+ metadata.gz: ffb3be97689579101a317b3e3747b6fd033a2d66bd37644135a029a6a5ca228e4bec4974d2a59ae1339a720b11f5de2bb32aa9f94e7f6be3dac4e9b87b699a7d
7
+ data.tar.gz: e7164332db7a8c1e07048632180c1a4576ea4608e530fc4545ca5358e2169dc2db16236df17ed7356e8888bd8ed492ed196688df9113905521e7a94801d69ecb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dry-swagger (0.4.1)
4
+ dry-swagger (0.4.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -110,8 +110,12 @@ module Dry
110
110
  end
111
111
 
112
112
  def visit_sum(node, opts = {})
113
- opts[:nullable] = true
114
- visit(node[1], opts)
113
+ if node[0][0].equal?(:constrained)
114
+ opts[:nullable] = true
115
+ visit(node[1], opts) # ignore NilClass constrained
116
+ elsif node[0][0].equal?(:struct)
117
+ visit(node[0], opts) # grab left operand, this means if you have it defined as DTO1 | DTO2, it will grab DTO1
118
+ end
115
119
  end
116
120
 
117
121
  def visit_struct(node, opts = {})
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Swagger
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-swagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jane-Terziev