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

Hey guys! I'm having an issue using Grape with cache (Garner) and send the results with grape-entity. The issue is: the second time I request an object Garner start working,...

bug

Maybe clarify that you can call methods on objects like this: ``` expose :categories, :using => CategoryEntity do | instance | instance.method_that_returns_categories(option_1, option_2) end ``` Useful if you use a...

feature

Hey again :) I'm using this inside an AR model class: def links { self: topic_path(self), publish: publish_topic_path(self) } end And the entity associated to this model features: expose :links,...

question

`valid_exposure?` uses `respond_to?`, and does not work with `method_missing`. Something like this would make it work ``` ruby def respond_to_attribute?(object, attribute) object.send(attribute) true rescue false end ``` but it does...

question
bug?

Right now grape-entity supports conversion to json by using 'multi_json'. Do you think it's a good idea to require "active_support/core_ext/hash/conversions.rb" to enable xml formatting for to_xml method?

feature

We had this in the Rakefile ``` # # TODO: setup a place for documentation and then get this going again. # # begin # require 'yard' # DOC_FILES =...

feature

### Context A PR addressing this issue: https://github.com/ruby-grape/grape-entity/issues/368 The thing I am confused about is why we check if `object.respond_to?(:fetch, true)`. Implementing `#fetch` is tricky and I think that most...

### Context When delegating to a `FetchableObject`, we've seen that it can cause breaking changes since it's only checking `object.respond_to?(:fetch, true)` [here](https://github.com/ruby-grape/grape-entity/blob/6eac458ddd69117ad979aaab7d1798bb1ba5a349/lib/grape_entity/delegator.rb#L18) as opposed to checking if the object is...

Fix the method Grape::Entity#exec_with_object to work with Ruby 3.

I use grape gem version is that: ``` grape (~> 1.8) grape-entity (~> 1.0) grape-middleware-logger (~> 1.12) grape-swagger (~> 1.6) grape-swagger-entity (~> 0.5) ``` When I use `rails 7.1.0`, the...