You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the scenario. I have a resource that needs to be created with a relationships. I POST to the server /api/accountAuthorizations with this request body:
Unfortunately, json_api_client version 0.14.0 throws an exception when calling included_data_for on the resource while deserializing this response. Partial stack:
It appears that json_api_client expects that if the relationships has a resource with a data object like in my example, there must be a matching full resource in the included section of the response payload. This doesn't have that.
I don't see this requirement in the JSON:API spec, and the Java client I'm also testing with (Crnk) handles this gracefully.
I'm going to try and create a pull request that just returns a nil in included_data_for in this scenario.
The text was updated successfully, but these errors were encountered:
dugsmith
pushed a commit
to dugsmith/json_api_client
that referenced
this issue
Jul 19, 2019
Here's the scenario. I have a resource that needs to be created with a relationships. I POST to the server
/api/accountAuthorizations
with this request body:The response back from the server includes the
data
section of therelationships
I passed in, like so:Unfortunately,
json_api_client
version 0.14.0 throws an exception when callingincluded_data_for
on the resource while deserializing this response. Partial stack:It appears that
json_api_client
expects that if therelationships
has a resource with adata
object like in my example, there must be a matching full resource in theincluded
section of the response payload. This doesn't have that.I don't see this requirement in the JSON:API spec, and the Java client I'm also testing with (Crnk) handles this gracefully.
I'm going to try and create a pull request that just returns a nil in
included_data_for
in this scenario.The text was updated successfully, but these errors were encountered: