goa_model_gen 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/goa_model_gen/config.rb +1 -1
- data/lib/goa_model_gen/loader.rb +4 -2
- data/lib/goa_model_gen/version.rb +1 -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: a1bb7af6761db790f79c2af6082ff4770d4d67d6564e7480e0dd158c2d03ec4b
|
4
|
+
data.tar.gz: 9a2b7b37485814180b6162d3de8dc6c92b0be9e5f990526c2de18ad713026107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72223fb263c19e187535f760b87f89b909231efd10d277db816bb5af3fa907ccec5825bbfba257b0678005f22e64a522b0a57429d50c8c95e2595b048ef8de6c
|
7
|
+
data.tar.gz: b03fcc86b5e1af9fee08e24ad14bbc6e1b85072d1921cc1e7ab70a2452fbe9a56d71da8f85383483912df7c7631470a5db4c4f336fa71489bbb0de8e6502d2b4
|
data/lib/goa_model_gen/config.rb
CHANGED
data/lib/goa_model_gen/loader.rb
CHANGED
@@ -7,6 +7,8 @@ require "goa_model_gen/type"
|
|
7
7
|
require "goa_model_gen/field"
|
8
8
|
require "goa_model_gen/source_file"
|
9
9
|
|
10
|
+
require "active_support/core_ext/string"
|
11
|
+
|
10
12
|
module GoaModelGen
|
11
13
|
class BaseLoader
|
12
14
|
attr_reader :path, :raw
|
@@ -106,11 +108,11 @@ module GoaModelGen
|
|
106
108
|
end
|
107
109
|
|
108
110
|
def load_files(paths)
|
109
|
-
swagger_loader = GoaModelGen::SwaggerLoader.new(config.swagger_yaml)
|
111
|
+
swagger_loader = config.swagger_yaml.present? ? GoaModelGen::SwaggerLoader.new(config.swagger_yaml) : nil
|
110
112
|
defined_types = {}
|
111
113
|
files = paths.map do |path|
|
112
114
|
GoaModelGen::ModelLoader.new(path).load_file.tap do |f|
|
113
|
-
f.types.each{|t| t.assign_swagger_types(swagger_loader) }
|
115
|
+
f.types.each{|t| t.assign_swagger_types(swagger_loader) } if swagger_loader
|
114
116
|
f.types.each{|t| defined_types[t.name] = t }
|
115
117
|
end
|
116
118
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goa_model_gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|