rspec-openapi 0.4.7 → 0.4.8

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: 91fc5996b0273d0dd4a7e0261b86902db52e7a64c1433bbcb8cf107abf5d3784
4
- data.tar.gz: 342051d1e3b6bb7a81af2f46fbb75b4c99658bf9cb075359104b6e2feef09985
3
+ metadata.gz: 4d6f2c98f9e3462e319dc05435274d53b933deb41553c2f4d7b70b3d4d135c7e
4
+ data.tar.gz: 48e8862133eebc1cf0a700eb720603159f6274012342b4f9d259157d527af525
5
5
  SHA512:
6
- metadata.gz: 0445f41450ef4cfa70548431356aea9dc94abe0a18a6b5132398f63db7c5c46eaf1a572ee41cdf234ed864d0aba490a51abfb36859edc637f4098c32c8ef39c1
7
- data.tar.gz: 5b318c2f1bec7f0608b89ab6cda871f4dddf6e8e2a2c7bd6dfed8430bb28597b97733bb34f1e03ee5fa0100170fedb0e47545b082b787e24e22e0e98a471591b
6
+ metadata.gz: 8420b3ad4d97a8a5e1d1dd89280f2dd95335e362997740fbbd342d7a352a2a90f3b1d912366ac3d32693c44e3b65ef0058522323fbdd5f1d6900cc122d1d1ae1
7
+ data.tar.gz: 891a7b33e112310e66ec6bcff616aac5c93a8036028ba95cf25b5ac40a3d89e2599a906782a15a107c37779a7c657bfda4b92d5fb4e364725300d071c2a870e3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.4.8
2
+
3
+ * Fix a bug in nested parameters handling
4
+ [#46](https://github.com/k0kubun/rspec-openapi/pull/46)
5
+
1
6
  ## v0.4.7
2
7
 
3
8
  * Add `info` config hash
@@ -158,9 +158,15 @@ class << RSpec::OpenAPI::SchemaBuilder = Object.new
158
158
  def build_example(value)
159
159
  return nil if value.nil?
160
160
  value = value.dup
161
+ adjust_params(value)
162
+ end
163
+
164
+ def adjust_params(value)
161
165
  value.each do |key, v|
162
166
  if v.is_a?(ActionDispatch::Http::UploadedFile)
163
167
  value[key] = v.original_filename
168
+ elsif v.is_a?(Hash)
169
+ adjust_params(v)
164
170
  end
165
171
  end
166
172
  end
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module OpenAPI
3
- VERSION = '0.4.7'
3
+ VERSION = '0.4.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-openapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-26 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.3.7
93
+ rubygems_version: 3.1.2
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Generate OpenAPI schema from RSpec request specs