grape-entity icon indicating copy to clipboard operation
grape-entity copied to clipboard

An API focused facade that sits on top of an object model.

Results 96 grape-entity issues
Sort by recently updated
recently updated
newest added

I want to use like this ```ruby expose :config1, merge: true, using: ApplicationEntity expose :config2, merge: true, using: ApplicationEntity ``` but I must use like this ```ruby expose :config1, merge:...

``` module API module V1 module Entities class A < Grape::Entity expose :k expose :l expose :status def status 'HI' end end end end end ``` ``` module API module...

These options are useful to specify exposed fields for a using entity per request: ```ruby class User < GE expose :name expose :email expose :age end class Responce1 < GE...

`expose_nil` [delegates to the underlying object](https://github.com/ruby-grape/grape-entity/blob/6a4686e85c1aa478db9a152a03ccce28c13560a1/lib/grape_entity/exposure.rb#L57) and doesn't test whether the method is `delegatable?` This can lead to odd behaviour and errors. You'd probably have to be doing inheritance with...

With grape-entity, I can write code like the following: ```ruby class Blob < Grape::Entity expose :path expose :filename, &:path end ``` This utilizes Ruby's somewhat obscure `&` operator to call...

I am not sure if this is a known issue or not, but when yielding to a block w/ 2 arguments (e.g. arity = 2) its possible to freeze your...

I am reporting as an issue what I found https://github.com/ruby-grape/grape-entity/pull/225. When calling `format_with:` with a block or `using:` option, the formatter is ignored: ``` ruby # formatter `foo` defined in...

feature

Given: A Grape::Entity that exposes another Grape::Entity Expected: When calling `.as_json` (or `serializable_hash`) it should recursively convert all objects to hashes Actual: Only the top level is converted, nested entities...

If I'm using grape-entity in Rails, and I do something like this: ``` ruby module Entities class User < Grape::Entity root :users, :user expose :id expose :name end end ```...

bug?

Hi! I'm trying to use my entity to ensure the returned data in the API matches what my Entity should be exposing in a RSpec request spec in my rails...