Skip to content

Conversation

@lode
Copy link
Owner

@lode lode commented Jun 22, 2015

This implements #3 and fixes some issues raised there.

@Pierozi
Copy link
Contributor

Pierozi commented Jun 29, 2015

Just a little bug and then we should be good.

The relationships in included are not followed.

https://github.com/lode/jsonapi/blob/master/src/response.php#L173

//unset($resource_array['relationships'], $resource_array['meta']);
$this->included_resources = array_merge($this->included_resources, $resource->included_resources);

if we comment the unset and add an merge of included at end of method, then we can have a deep included relationship working.

And have an Output JSON Like this https://gist.github.com/Pierozi/6361d7f80d6379df472b

@lode
Copy link
Owner Author

lode commented Mar 8, 2017

I'm sorry it took so long, but fyi, I'm going to merge and release this PR.

I added a separate issue for the bug you noted, as it is not a change from this PR. I plan to pick it up directly though.

@lode lode merged commit ee376b3 into master Mar 23, 2017
@lode lode deleted the improve-relation-input branch March 23, 2017 13:23
@lode
Copy link
Owner Author

lode commented Mar 23, 2017

This PR and a fix for the related #25 are now in the v1.4.0 & v1.4.1 releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants