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've recently started work on updating our codebase to the current versions of `grape`, `grape-entity` and `grape_logging`. Whereas one of our APIs works with `grape` 1.2.4, `grape-entity` 0.7.1 and `grape_logging`...

When I try to send an array of hash, I have the error ` instance of ActiveSupport::HashWithIndifferentAccess` Here is my model : ` expose :book, documentation: { type: Array[Hash] }`...

So why `root 'users', 'user'` not `root :users, :user` when all `expose` methods in docs generates symbols i.e. `expose :user_name` I find it out when using `merge: true` option and...

Are there any plans to add a caching layer to grape-entity? active_model_serializers has this functionality (https://github.com/rails-api/active_model_serializers#caching) and I am looking into how this can be added to grape-entities.

feature

It seems there is no way to set global description for the whole Entity. If use `grape-swagger-entity`, it takes entity definition outside from `resource`, which I think is incorrect. ```json...

When attempting to serialize a `Grape::Entity::Exposure::NestingExposure::OutputBuilder` in 0.7.0 using `Marshal.dump` (for caching), we encounter an error like `TypeError: can't dump IO`. ``` Rails.cache.fetch(key) do present(entity_items).as_json # this used to just...

Is there a way to add a default value to `expose` in case of the value is not present? For example ``` expose :tags do |filter| filter[:tags].present? ? filter[:tags] :...

User Entity ```ruby class User < EEntity expose :id, :name, :pinyin, :account_id, :hidden, :dept_id, :actived expose :initialism, as: :short_pinyin expose :role_code expose :login_name expose(:email, if: lambda { |u, op| op[:included_user_email]...

How to get each `expose` takes time? example: ```ruby expose :friend_names do |user, options| t1 = Time.now names = friends.map(&:name),join('',) t2 = Time.now puts "cost_time: #{t2 - t1}" names end...

Hi. I've recently tried to expose collection of objects of different types, but it seems that it's not possible with a current version. Here's the result I'm trying to achieve:...

bug?