Update generator to correctly handle int64/uint64 types as fixnum/bignum instead of strings
This commit is contained in:
1 parent
2c190e9745
commit
39d0a164b5
5 files changed
+22
-1
No files matched your search
@@ -51,6 +51,8 @@ module Google
|
||||
when 'string', 'boolean', 'number', 'integer', 'any'
|
||||
return 'DateTime' if format == 'date-time'
|
||||
return 'Date' if format == 'date'
|
||||
return 'Fixnum' if format == 'int64'
|
||||
return 'Fixnum' if format == 'uint64'
|
||||
return TYPE_MAP[type]
|
||||
when 'array'
|
||||
return sprintf('Array<%s>', items.generated_type)
|
||||
|
||||
@@ -33,7 +33,7 @@ class <%= cls.generated_class_name %>
|
||||
<% elsif property.type == 'array' -%>
|
||||
collection :<%= property.generated_name %>, as: '<%= property.name %>'<%= include('representation_type', :lead => ', ', :type => property.items, :api => api) %>
|
||||
<% else -%>
|
||||
property :<%= property.generated_name %>,<% if property.format == 'byte' %> :base64 => true,<%end%> as: '<%= property.name %>'<%= include('representation_type', :lead => ', ', :type => property, :api => api) %>
|
||||
property :<%= property.generated_name %>,<% if ['uint64', 'int64'].include?(property.format) %> :numeric_string => true,<%end%><% if property.format == 'byte' %> :base64 => true,<%end%> as: '<%= property.name %>'<%= include('representation_type', :lead => ', ', :type => property, :api => api) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
Reference in new issue
Block a user