open_api_import 0.5.0 → 0.5.1
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/README.md +1 -1
- data/lib/open_api_import.rb +12 -1
- 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: 761700c299edc214d9d850fcb9122012224af56a51c6c9f5e7a74c3df6608251
|
4
|
+
data.tar.gz: 6aa253d816f741b7127613b24eec15354cfc47a479cce7590b5566ee1b7ce867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6288e35f9379f8394f01288f6374f37d2278727fd51948a8cb2185ecaf371950560b88a64024b8980eb5fe16c2678e0dd7fe9c966210762efec49f49014de304
|
7
|
+
data.tar.gz: 2eaf68cc41bdb66ad21632177cbe0e13e5c623063a744a552ece4c6c6c997384d459cfd1e1097506ed42d95fbfb0c50ce263b5bebf440129b9214b3dcd7a5229
|
data/README.md
CHANGED
data/lib/open_api_import.rb
CHANGED
@@ -52,7 +52,18 @@ class OpenApiImport
|
|
52
52
|
File.delete(file_errors) if File.exist?(file_errors)
|
53
53
|
import_errors = ""
|
54
54
|
|
55
|
-
|
55
|
+
begin
|
56
|
+
definition = OasParser::Definition.resolve(swagger_file)
|
57
|
+
rescue Exception => stack
|
58
|
+
message = "There was a problem parsing the Open Api document using the oas_parser gem. The execution was aborted.\n"
|
59
|
+
message += "Visit the github for oas_parser gem for bugs and more info: https://github.com/Nexmo/oas_parser\n"
|
60
|
+
message += "Error: #{stack.message}"
|
61
|
+
puts message
|
62
|
+
@logger.fatal message
|
63
|
+
@logger.fatal stack.backtrace
|
64
|
+
exit!
|
65
|
+
end
|
66
|
+
|
56
67
|
raw = definition.raw.deep_symbolize_keys
|
57
68
|
|
58
69
|
if raw.key?(:openapi) && (raw[:openapi].to_f > 0)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_api_import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oas_parser
|