jsonapi-renderer
jsonapi-renderer copied to clipboard
Efficiently render JSON API documents.
I am developing a rails application using jsonapi-rb 0.5.0 (jsonapi-serializable 0.3.0). In the relevant serializer I have: belongs_to :programme For the `index` method in the controller: this gives the desired...
This PR enables rendering multiple included resources together by grouping them in arrays first (if their `jsonapi_type` and `jsonapi_id` are the same) and then rendering them one-by-one while merging the...
This PR changes the build badges to SVG for sharper readability ✨
This change unifies the output type of `SimpleResourcesProcessor` and `CachedResourcesProcessor`. Before: ```Ruby # No caching result = JSONAPI::Serializable::Renderer.new(cache: false).render(collection) result[:data].first.class # => Hash # With caching result = JSONAPI::Serializable::Renderer.new(cache: Rails.cache).render(collection)...
something like: https://github.com/json-api/json-api/issues/940 basically, if you have a tree structure, where your relationships are parent/children, you can never get all the children.
Working through implementing includes I have discovered what appears to be a bug. All my other code like this works as expected and the only difference I can find is...
When I start implementing caching in my app, I noticed [CachedResourcesProcessor#process_resources](https://github.com/jsonapi-rb/jsonapi-renderer/blob/daa95d830a6f71a39304c8db20c8acd89e34b7a7/lib/jsonapi/renderer/cached_resources_processor.rb#L17) returns an array of strings, but [SimpleResourcesProcessor#process_resources](https://github.com/jsonapi-rb/jsonapi-renderer/blob/daa95d830a6f71a39304c8db20c8acd89e34b7a7/lib/jsonapi/renderer/simple_resources_processor.rb#L7) returns an array of hashes. I assume the api should expect to...
Also multi_fetch should use the splat operator. http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html#method-i-fetch_multi
How to render error code as described in JSON API specification? There is no documentation to show this.