Sha256: de73be45e4ee8ad8d37674c654d6b05602d69d1b9e88ecd2963f8ae8f708863a
Contents?: true
Size: 325 Bytes
Versions: 2
Compression:
Stored size: 325 Bytes
Contents
class <%= name.classify %>Entity < Grape::Entity root :data, :data expose :id, proc: lambda { |o, opts| o.id.to_s }, documentation: { type: 'String', description: 'ID' } expose :type, proc: lambda { |o, opts| o.class.name.underscore }, documentation: { type: 'String', description: '"<%= name.underscore %>"' }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
napa-0.1.16 | lib/napa/generators/templates/api/app/entities/%name_underscore%_entity.rb.tt |
napa-0.1.15 | lib/napa/generators/templates/api/app/entities/%name_underscore%_entity.rb.tt |