goa_model_gen 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25df35a771941569f1cc0d673cf55aa495ba1adf6f3564125d7eba6ab06b8488
4
- data.tar.gz: 0ab052e85aea399812388f432a4456aa94593ac6dc3a6eb8a6e8b6d74ab49f83
3
+ metadata.gz: 8acbfbf3f1441f36b014cf90e8f442637a3acf766683fe29f7d7c3adda6a11e9
4
+ data.tar.gz: 6e2565c972898acfb5fbfbd9430d70aeabe8c13cb386e9b0915b24f1193dee04
5
5
  SHA512:
6
- metadata.gz: 3ea8759b250c70bc928492261d5e021da4d8e1f450996fca90ad4351f51fcfe1ca2729d7c2fa4809e00f780f2b317df3be43f43a27e4c7bb146193c52922e4de
7
- data.tar.gz: 0e5b413caa17dea3777909ad925a121f4e9266551ee83f8fc4e67d1a9f78a46b479c773068f834d437f619c0b9a02bff308ce99322105c768f9ec9f669e59bbc
6
+ metadata.gz: 91b451a21d658126db5bdc729c0305088f5c5a9096370fa3241345122505fa7102550608ec60e72ae7df0449d811671918fd12d637b9a59663a149afd7dcd467
7
+ data.tar.gz: 2d9ddf2229fb5d158e103db041f2b9e1c571bcd9e2b993087cef32eb99517809e531b7050632df098c2791b6d09070ab92d4a0a5f7ae47898fa527cc4e5576b3
@@ -57,7 +57,7 @@ module GoaModelGen
57
57
  def converter(*paths)
58
58
  show_version_if_required
59
59
  load_types_for(paths) do |source_file|
60
- generator = new_generator.tap{|g| g.types = source_file.types }
60
+ generator = new_generator.tap{|g| g.source_file = source_file }
61
61
  dest = File.join(cfg.controller_dir, File.basename(source_file.yaml_path, ".*") + "_conv.go")
62
62
  if source_file.types.any?{|t| !!t.payload || !!t.media_type}
63
63
  generator.run('templates/converter.go.erb', dest, overwrite: true)
@@ -14,7 +14,7 @@ import (
14
14
  "<%= config.go_package %>/model"
15
15
  )
16
16
 
17
- <%- types.select(&:gen_converter?).each do |type| -%>
17
+ <%- source_file.types.select(&:gen_converter?).each do |type| -%>
18
18
  <%- if type.payload -%>
19
19
  func <%= type.name %>PayloadToModel(payload *app.<%= type.payload_name %>) (*model.<%= type.name %>, error) {
20
20
  model := &model.<%= type.name %>{}
@@ -1,3 +1,3 @@
1
1
  module GoaModelGen
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goa_model_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm