Introduced NestedDynamicFieldsMixin to allow nested serializers to filter themselves.
@jtrain In this PR, based on your work in #43, I fixed the logic related to serializer level computation for serializers using ListSerializer.
I also refined the implementation, for example, by replacing the while loops in get_source_path and compute_level with a recursive approach.
Additionally, I extended the test suite to cover nested serializers that use ListSerializer, and added a third level of nesting to ensure the logic works correctly across multiple nesting levels.
Let me know what you think.
Thank you!
Just a heads up, I've assigned somebody else from our team to review this PR, so we should see that review shortly. Hopefully that'll make merging easier, since it usually adds some polish.
I know as a open source maintainer that a PR creates a sense of pressure. I've never had a team submit a PR and then review it, but I assume it'd create an even bigger sense of pressure. I just wanted to write and clarify that that's not our intent at all. The review is helpful for us too, and since we're on a tight timeline, we're vendoring the code into our project anyway, so we get the functionality we need if the PR here isn't desired.
So I hope the review helps, and if the maintainers here like the feature, I hope we can merge it, but if not, no worries. We have the fix we need in our own system already.
I hope that makes sense and thank you to the maintainers for their work on this package! We've used it for years and really appreciate it.
Thanks @ERosendo for your review I've applied the suggested changes.