open_api-rswag-specs 0.0.5 → 0.0.6
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 +4 -4
- data/lib/open_api/rswag/specs/example_group_helpers.rb +12 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c0fe7fc3387e662f8f4d59a12dab9e5718a69afc6d1be9e8b8adb1d6b3d8eb2
|
|
4
|
+
data.tar.gz: e56fa6b7a6e487c5142a3a0a4aafa697b8b9fe01428c25e21c5eae1f228e81f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4596795d0131936340d0ed352b1f8801e178b8ea9c4aa44339badeb3cc73a40ef60dd89b08536c32098e5fa528489ca0bb1cab0fcd22c5985dc469e8f9a21976
|
|
7
|
+
data.tar.gz: 0c3051f8dc9dcbefc7711b0068e5e773b211bc1765eb3d2bf1b415fbc553b1ca4cf65e7c127072b5b9e0ee157b33701eb9a90a7d1fcbcd3a036f5563de13cfed
|
|
@@ -106,12 +106,11 @@ module OpenApi
|
|
|
106
106
|
request_body(description: description, content: content_hash)
|
|
107
107
|
|
|
108
108
|
schema.extend(Hashie::Extensions::DeepLocate)
|
|
109
|
-
file_properties = schema.deep_locate ->
|
|
110
|
-
|
|
109
|
+
file_properties = schema.deep_locate ->(_k, v, _obj) { v == :binary }
|
|
111
110
|
hash_locator = []
|
|
112
111
|
|
|
113
112
|
file_properties.each do |match|
|
|
114
|
-
hash_match = schema.deep_locate ->
|
|
113
|
+
hash_match = schema.deep_locate ->(_k, v, _obj) { v == match }
|
|
115
114
|
hash_locator.concat(hash_match) unless hash_match.empty?
|
|
116
115
|
end
|
|
117
116
|
|
|
@@ -119,9 +118,17 @@ module OpenApi
|
|
|
119
118
|
locator.select { |_k,v| file_properties.include?(v) }
|
|
120
119
|
end
|
|
121
120
|
|
|
121
|
+
existing_keys = []
|
|
122
122
|
property_hashes.each do |property_hash|
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
property_hash.keys.each do |k|
|
|
124
|
+
if existing_keys.include?(k)
|
|
125
|
+
next
|
|
126
|
+
else
|
|
127
|
+
file_name = k
|
|
128
|
+
existing_keys << k
|
|
129
|
+
parameter name: file_name, in: :formData, type: :file, required: true
|
|
130
|
+
end
|
|
131
|
+
end
|
|
125
132
|
end
|
|
126
133
|
end
|
|
127
134
|
|
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
|
+
version: 0.0.6
|
|
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-
|
|
12
|
+
date: 2019-09-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|