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 use grape entity in below way. And got a n+1 warning in `expose :roles` methods. I need know how can I call `includes(:roles)` methods before exposed. Thks! ### Model...

Bit of a unique use case here - we work in education, and thus have `Student` and `Klass` models and corresponding relationships. The call `student.klass` returns that student's "class" (meaning...

I was looking for a way to not expose some attributes to the `openapi-spec.json` entities representations and I found that there was `in: "header"` option in the `documentation` hash that...

At the moment when one sets :type when calling #present helper method, that type is not going to change throughout nested entities. It should though. For example: when exposing a...

feature

I'd like to return a JSON array that has two different types of models, each with its own `Grape::Entity`. So for example, I have a `package`, which has this ```...

question
feature

class definition: `class:Order` `class OrderAsk < Order has_many :trades` api call: `orders_new = present orders, with: APIv2::Entities::OrderEntity unless orders.empty?` so, if orders has one or more orders that has multiple...

```ruby with_options documentation: {required: true, type: 'integer'} do expose :posts_count, as: :posts, documentation: {example: 7} expose :followers_count, as: :followers, documentation: {example: 105} expose :following_count, as: :following, documentation: {example: 52} expose...

Hi, I've seen other issues about doing nested collections of different data, but I believe my situation is slightly different. We have an ElasticSearch query that gets run across multiple...

question

I want to respond to the specified object itself. If you program as follows, you will get an error with no `body` method. ``` class BodyEntity < Grape::ENtity expose :body...