roar-jsonapi
roar-jsonapi copied to clipboard
JSON API support for Roar.
When I call `to_json()` on a representer from collection without specifying included records I get the full compound document complete with the included records. ```json "{\"data\":[ {\"relationships\":{ \"feature-image\":{\"data\":{\"id\":\"1\",\"type\":\"images\"}}, \"images\":{\"data\":[{\"id\":\"1\",\"type\":\"images\"}]}, \"documents\":{\"data\":[]},...
### Description This PR changes the `.travis.yml` file to use the latest `1.x` version of `bundler` since from version 2 they dropped support for Ruby versions 2.2 and older ([more...
Cross-referencing trailblazer/trailblazer-operation#17, where I originially submitted this issue ### Complete Description of Issue When using trailblazer-operation, roar-jsonapi, and reform in conjunction with an Update call, the `id` field of a...
### Complete Description of Issue Due to legacy design, we want to use the non-strict behavior for `as: ` for property-names, allowing underscores. Following the [Documentation](http://trailblazer.to/gems/roar/jsonapi.html#member-names) I implemented a representer...
I have model User which has many Roles and Role has many Permissions The UserRepresenter class UserRepresenter < BaseRepresenter type :users link :self, toplevel: true do "/users" end attributes do...
_From @caseymct on January 22, 2016 2:22_ Trying to transition from a standard representer format to json-api. I have a model, Notification, that has a polymorphic `target` - it can...
### Complete Description of Issue When files containing classes that inherit from `Roar::Decorator` and use the `include Roar::JSON::JSONAPI.resource` declaration are dynamically reloaded, there is a performance degradation. As the number...
I have some issues using the JSONAPI output for collections. I'm generating the collection output with: ``` orgs = paginate(Libis::Ingester::Organization.all) Representer::OrganizationRepresenter.for_collection.prepare(orgs).to_hash(pagination_hash(orgs)) ``` The options generated by 'pagination_hash' looks like this:...
_From @matheusca on November 19, 2015 22:15_ Hi guys, I've trying create association links using `Roar::JSON::JSONAPI` but I can't reference `represented` method inside of the `has_one` block. For instance: ```...
_From @ekosz on January 6, 2015 15:42_ Given the code ``` ruby module SongsRepresenter include Roar::JSON::JSONAPI type :songs property :id property :name end class Song < OpenStruct include Roar::JSON::JSONAPI include...