jsonapi-serializable icon indicating copy to clipboard operation
jsonapi-serializable copied to clipboard

Conveniently build and efficiently render JSON API resources.

Results 21 jsonapi-serializable issues
Sort by recently updated
recently updated
newest added

When rendering custom class / serializer mappings: ``` render_jsonapi records, class: { :'User' => ::FrontEnd::SerializableUser, :'Comment' => ::FrontEnd::OnDemand::SerializableComment } ``` If the left-hand key isn't correct, you will get a...

This gem seems to be similar, but with more active development (though active development could also be because it has more bugs, and more bug fixes, hehe 😄). https://github.com/Netflix/fast_jsonapi Would...

I'd love to be able to selectively run logic in the meta only if the relationship is included. So I could avoid calling the Posts.count method if posts weren't included....

enhancement

Consider a serializer: ```ruby class SerializableEmployee < JSONAPI::Serializable::Resource attribute :title do primary_office.title end has_one :primary_office do data { primary_office } end private def primary_office @object.offices.sort_by(&:rank).first end end ``` The above...

Something like `attribute :foo, key_format: false`.

Imagine a book has multiple authors. You want to fetch an author, their books, and all the other co-authors for those books. `/authors/123?include=books.authors` Currently, if you do this, it will...

When rendering document with conditional relationship which is not be rendered it is still rendered in `included` documents. ```` require 'spec_helper' describe JSONAPI::Serializable::Renderer, '#render_relationship' do let(:posts) { [Post.new(id: 1), Post.new(id:...

bug

## Example ```ruby relationship :user, unless: -> { @object.user.nil? } do link :related do @url_helpers.v1_user_path @object.user end end ``` ## Expected outcome The relationship block is not called when the...

I believe [this commit](https://github.com/jsonapi-rb/jsonapi-serializable/commit/e95fd7e142ec35befacee823608862bf4c233c60), which changed from `prepend` to `extend`, broke the conditional support. I noticed this when [trying to upgrade jsonapi_compliable](https://github.com/jsonapi-suite/jsonapi_compliable/pull/36) - my `if` procs no longer get called,...

Fix for conditional attribute inclusion using the 0.2.1 conditional_fields.rb