open_api-rswag-specs 0.0.4 → 0.0.5

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
  SHA256:
3
- metadata.gz: 16dfa3086e6aac66830a09692c5a2bf9309218f046aae1fc7ac7651821e23ce8
4
- data.tar.gz: 0b05200a365269ebff5cbffe64fc61a2fc81c5adb604ab57b54410f072d0b09a
3
+ metadata.gz: baaf90ed923b6ca3725592a03fdfc9a9685e92d5866e0c415d1ab282411a77c7
4
+ data.tar.gz: b42537943e938f5e53f4ebe5e7d1526e6cc8a608ed640a39f52d3ba96246c38a
5
5
  SHA512:
6
- metadata.gz: eef7b341f14de4c3339ee4f7828b2c2729133de1779328403e84314f274ed286ac8cdbacebf0067fb72b4a7e29d4a35be4c7883f717c8c9687b17a52e2aa2537
7
- data.tar.gz: b9ad36c2bd9980862b1c96f7b65ff0056b37808aca5cfe8db0cc794649131bc59f300bd778b75e1733877693dfe907f33560e283697c923c816fd151c495ab68
6
+ metadata.gz: 633ae143e6bd9a5d9471d858fdd2ac0a379a7b952e815a33cc6fd9bfcc39ed65cfc9227b3e458ce22eb30c615c25f74b29611e6cba12d033545103955d6b2cf9
7
+ data.tar.gz: c530571dbe210038125131ba530ff9e26cce38d78cdf427623e14c8b1f03abace980c5e6e03c90e5053870f8d6efe4cd80f237388095336bff77a861c85cd7e1
@@ -238,7 +238,9 @@ module OpenApi
238
238
 
239
239
  if body_parameter && respond_to?(body_parameter[:name]) && example.metadata[:operation][:requestBody][:content]['application/json']
240
240
  # save response examples by default
241
- example.metadata[:response][:examples] = { 'application/json' => JSON.parse(response.body, symbolize_names: true) } unless response.body.to_s.empty?
241
+ if example.metadata[:response][:examples].nil? || example.metadata[:response][:examples].empty?
242
+ example.metadata[:response][:examples] = { 'application/json' => JSON.parse(response.body, symbolize_names: true) } unless response.body.to_s.empty?
243
+ end
242
244
 
243
245
  # save request examples using the let(:param_name) { REQUEST_BODY_HASH } syntax in the test
244
246
  if response.code.to_s =~ /^2\d{2}$/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_api-rswag-specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richie Morris
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-08-04 00:00:00.000000000 Z
12
+ date: 2019-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -135,7 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.0.4
138
+ rubyforge_project:
139
+ rubygems_version: 2.7.7
139
140
  signing_key:
140
141
  specification_version: 4
141
142
  summary: A Swagger-based DSL for rspec-rails & accompanying rake task for generating