JSONAPI::ResourceTree#load_included was failing to correctly
populate the resource fragments of included resources, such that
the include_related parameter was null. This was resulting in
the relationships object lacking a data attribute for nil or
empty resources.
Fixes #1371
JSONAPI::ResourceTree#load_included was failing to correctly populate the resource fragments of included resources, such that the
include_related
parameter was null. This was resulting in the relationships object lacking a data attribute for nil or empty resources.The JSON-API specification states that a null or empty array should be returned in these circumstances: https://jsonapi.org/format/#document-resource-object-linkage
The underlying issue appears to be the use of
include_related
rather than the symbol:include_related
when initializing nested resource fragments.All Submissions:
New Feature Submissions:
Bug fixes and Changes to Core Features:
Test Plan:
Reviewer Checklist: