google-api-ruby-client/google-apis-generator/lib/google/apis/generator/templates/_representation_type.tmpl

11 lines
448 B
Cheetah

<% if type.type == 'array' -%>
<%= lead %>:class => Array do
include Representable::JSON::Collection
items<%= include('representation_type', :lead => ' ' , :type => type.items, :api => api) %>
end
<% elsif ['date', 'date-time'].include?(type.format) -%>
<%= lead %>type: <%= type.generated_type %>
<% elsif type.type == 'object' -%>
<%= lead %>class: <%= type.generated_type %>, decorator: <%= type.generated_type %>::Representation
<% end -%>