Wasif Hossain

Results 40 comments of Wasif Hossain
trafficstars

we can use a band-aid solution to have grape tests passed, by restricting **rack to

Travis is looking green (partially) after quite some time. CRuby tests are all passed. JRuby 9.2.x are also passing, though 9.1.x failed due to already existing bundler > 2.

Removing bundler >= 2 didn't help either; it still remains (most probably due to rubygems) ![image](https://user-images.githubusercontent.com/1168927/74820007-7895be00-532b-11ea-91bb-2afe7fc06bd2.png)

can we wrap it up, as https://github.com/rails-api/active_model_serializers/issues/1939#issuecomment-299091351 and https://github.com/rails-api/active_model_serializers/issues/1939#issuecomment-502283184 address different ways to achieve the target? or do we still need to address something to resolve the case. thanks

fyi, there is another open issue for this regard: https://github.com/rails-api/active_model_serializers/pull/2428. thanks!

> In the YARD docs it suggests that using a symbol-keyed hash will work: > https://github.com/rails-api/active_model_serializers/blob/873cf4add2bfa1ca1a96f63ed7d89912c4d253e4/lib/active_model_serializers/adapter/json_api/deserialization.rb#L22 it says about the `keys` option; not about the `data` found inside the JSON...

> But in the code, it will actually check via string-keys: > https://github.com/rails-api/active_model_serializers/blob/873cf4add2bfa1ca1a96f63ed7d89912c4d253e4/lib/active_model_serializers/adapter/json_api/deserialization.rb#L118 because `payload` is expected to be a valid JSON API document, either string-keys or `ActionController::Parameters`, as mentioned...

to be honest, I have found one gotcha though: it should be `relationships` according to the [JSON API spec](https://jsonapi.org/format/#document-resource-object-relationships) in place of `associations` on L35, as found in: https://github.com/rails-api/active_model_serializers/blob/873cf4add2bfa1ca1a96f63ed7d89912c4d253e4/lib/active_model_serializers/adapter/json_api/deserialization.rb#L27-L56 may...

according to the spec, a valid JSON API document keys should be **stringified**, as shown in this typical example https://jsonapi.org/format/#document-compound-documents ```json { "data": [{ "type": "articles", "id": "1", "attributes": {...

I will push a PR with a working example for this api (https://github.com/rails-api/active_model_serializers/issues/2384#issuecomment-650523973) thanks for pointing it out :+1: