The @spec for the relationshipscallback for JSONAPI.View actually did not allow for the various new structures a relationships callback is allowed to return under the above PR.
The PR was intended to support (among other more general purposes) remapping of an attribute field to a relationship -- this is niche, but sometimes quite useful. The above PR and its tests failed to fully realize that goal by missing one small detail (lost in a merge conflict resolution, as it turns out).
This PR fixes both of these problems and adds test coverage for the latter.
The features of https://github.com/beam-community/jsonapi/pull/270 were broken in two ways that this PR fixes.
@spec
for therelationships
callback
forJSONAPI.View
actually did not allow for the various new structures arelationships
callback is allowed to return under the above PR.This PR fixes both of these problems and adds test coverage for the latter.