open_api-rspec 0.1.6 → 0.1.7
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/Gemfile.lock +1 -1
- data/lib/open_api/rspec/schema_parser.rb +8 -12
- data/lib/open_api/rspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc4da8b6e860b0992daf1b33d972ad7cd15b78a9465675e8112c13a48841ed78
|
4
|
+
data.tar.gz: 9089cd5f2f76a521a6dbfe588663f1c2be4ef2bd369451fb36d801b2bbb2f1af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b16666cd3f2899098aa3f4f4e9f735b389e4d440d6480c738fcf382a828e91ff813404e4ef5c42debdeb882fe3c0288f97fbd3e6837e110be39d462d12a2549
|
7
|
+
data.tar.gz: b2ded7a64be1339957bba72b95f079764be0eaa8f415a9123f5324eccf0032272db2d41aa8f3e01e2aff3e2c6f7a2fe8d0334662673aef9240a8d56235dd78fc
|
data/Gemfile.lock
CHANGED
@@ -138,23 +138,19 @@ module OpenApi
|
|
138
138
|
end
|
139
139
|
|
140
140
|
def openapi_form_data_params
|
141
|
-
schema_for_url_and_request_method_form_data_parameters.
|
142
|
-
if p['schema'].present?
|
143
|
-
keys = p['schema']['properties'].flat_map do |k, v|
|
144
|
-
deep_body_keys(k, v)
|
145
|
-
end
|
146
|
-
keys.map { |key| "#{p['name']}##{key}" }
|
147
|
-
else
|
148
|
-
p['name'].to_s
|
149
|
-
end
|
150
|
-
end
|
141
|
+
schema_for_url_and_request_method_form_data_parameters.map { |p| p['name'].to_s }
|
151
142
|
end
|
152
143
|
|
153
144
|
def openapi_body_params
|
154
145
|
schema_for_url_and_request_method_body_parameters.flat_map do |p|
|
155
146
|
if p['schema'].present?
|
156
|
-
|
157
|
-
|
147
|
+
body = if p['schema']['$ref']
|
148
|
+
scheme = p['schema']['$ref'].tr('/', ' ')[2..-1].strip.split.map(&:to_s)
|
149
|
+
@openapi_schema.dig(*scheme)
|
150
|
+
else
|
151
|
+
p['schema']
|
152
|
+
end
|
153
|
+
|
158
154
|
body['properties'].flat_map do |k, v|
|
159
155
|
deep_body_keys(k, v)
|
160
156
|
end
|