open_api_import 0.10.9 → 0.11.0
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_import/filter.rb +28 -0
- data/lib/open_api_import/get_data_all_of_bodies.rb +22 -0
- data/lib/open_api_import/get_examples.rb +88 -0
- data/lib/open_api_import/get_patterns.rb +67 -0
- data/lib/open_api_import/get_required_data.rb +30 -0
- data/lib/open_api_import/get_response_examples.rb +104 -0
- data/lib/open_api_import/open_api_import.rb +693 -0
- data/lib/open_api_import/pretty_hash_symbolized.rb +18 -0
- data/lib/open_api_import.rb +10 -1024
- metadata +36 -14
@@ -0,0 +1,18 @@
|
|
1
|
+
module LibOpenApiImport
|
2
|
+
#gen pretty hash symbolized
|
3
|
+
private def pretty_hash_symbolized(hash)
|
4
|
+
output = []
|
5
|
+
output << "{"
|
6
|
+
hash.each do |kr, kv|
|
7
|
+
if kv.kind_of?(Hash)
|
8
|
+
restv = pretty_hash_symbolized(kv)
|
9
|
+
restv[0] = "#{kr}: {"
|
10
|
+
output += restv
|
11
|
+
else
|
12
|
+
output << "#{kr}: #{kv.inspect}, "
|
13
|
+
end
|
14
|
+
end
|
15
|
+
output << "},"
|
16
|
+
return output
|
17
|
+
end
|
18
|
+
end
|