Closed BorisJineman closed 4 years ago
Hide whitespace changes might be helpful,
https://github.com/jasminb/jsonapi-converter/pull/227/files?utf8=%E2%9C%93&diff=split&w=1
Hello @BorisJineman, thanks for the PR.
Will take a look and merge/leave comments as soon as I can.
Cheers
Hi @jasminb and Team,
Thank you very much, :)
Hi team, I saw that #224 have been merged, and it was going to deal a same problem, so I closed it.
Hi Team,
We were working on some projects using jsonapi-converter library to make sure our response is strictly following the standard.
We met a problem when we write relationship objects. For the reason of reducing the data size, we would like to only write links out, but without embedding Included resource objects in
included
field. The most similar issue is https://github.com/jasminb/jsonapi-converter/issues/186To implement above requirement and resolve the problem. We did a simply change. It can allow users to only write links or meta fields but no data filed in relationship objects.
Usage: Simply set the Relationship field to null at runtime.
Given the Relationship field are equals to null, so it will also not appears in Included resource objects.
Could team review it, thanks a lot.
Peace and Long Life, Boris