Closed usu closed 2 years ago
PR is now feature complete and all tests pass after using the new owning references introduced with https://github.com/carlobeltrame/hal-json-normalizer/pull/71
I will still try to refactor/simplify the handling of embedded collections a bit.
@carlobeltrame: PR would be ready for review. Got a bit larger than expected. Took the opportunity to rename/cleanup some stuff after the refactoring.
Maybe easiest to go through the last 4 commits separately. Otherwise I can also offload them into a separate PR.
Thanks so much for this! I love the renaming and especially the removal of the mixin pattern that this enabled. Let me know if I should finish this up.
Thanks for review/comments. I'll give it a try & cry for help if needed.
Fixes the issue with embedded collections which don't come with an own standalone link.
In the current implementation, an embedded collection is detected by investigating the first element of the collection and check if it looks like a link. For obvious reasons, this fails for empty embedded collections.
Needs this additional feature in
hal-json-normalizer
: https://github.com/carlobeltrame/hal-json-normalizer/pull/64