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

I've noticed there is a non-standard behavior (feature?) that's breaking the json api spec when including different combinations of `fields` and `include` parameters. For example, given three models `Author`, `Book`,...

First attempt at addressing https://github.com/jsonapi-rb/jsonapi-serializable/issues/124

Hey, I've noticed that when you use first KeyFormat and then ConditionalFields, some conditions are ignored. This happens when formatted key differs from the original key and then its condition...

Not sure if this is better here; or in another place like https://github.com/jsonapi-rb/jsonapi-renderer/issues/34 When you have a similar data type, but it has been modelled as two separate things (for...

`KeyFormat` breaks included relationships when the relationship's name is subject to key transformation. ```ruby class Resource < JSONAPI::Serializable::Resource extend JSONAPI::Serializable::Resource::KeyFormat key_format ->(key) { key.to_s.camelize(:lower) } end ``` ```ruby class ContactResource...

Is there a way, for all serializer or only just one, to automatically dasherize key with an underscore? I am migrating from AMS that was dasherizing automatically all keys.

``` attribute :foo do memo_method end def memo_method @memo ||= 'adsf' end ``` Will raise error `RuntimeError: can't modify frozen ...`, due to [this #freeze call](https://github.com/jsonapi-rb/jsonapi-serializable/blob/2f6cc4290474072ce0633481a57a3eb8f59ee10a/lib/jsonapi/serializable/resource.rb#L39). Is there a downside...

Hi all. Upcoming JSON:API version recommending camelCase. Currently, I derived serializable resources from base one which defines key format as: ``` key_format ->(key) { key.to_s.camelize(:lower) } ``` Is it possible...

In our serializers we make liberal use of linkage(always: true). This fully renders the relationship including any calls out to new linkages. This is a performance issue and generates n+1...

Currently, the only way to specify what class to use for when serializing a relationship is to give the renderer the `class` option with a hash with an entry for...