jsonapi-serializer
jsonapi-serializer copied to clipboard
Fix relationships when two types start with the same string
Hi :wave:
First of all, thanks for open sourcing this lib !
I've found a bug when working with a JSON API that have both the products and productsearch type. It created a conflict when looking for an ancestry and the products's relationships weren't included although they should be.
Before this PR, json.product.image didn't exist in the test I've added.
Not sure if ; is the best separator here but since there is already : in use I guess it's OK.
Please merge - we are running into the same problem
We could use this fix as well here. Please consider merging @SeyZ :)
@SeyZ I'm so sorry, could you possibly share the maintenance of this repository with someone else so that someone can develop this package? Thanks. Also @JulienPradet This pull request fixes the issue but creates another, namely an extra nesting of data, "user": { "id": 1, "profile": { "user": "id": 1, ... }}}.
@slimee maybe you have access to resolve this issue?