drf-dynamic-fields
drf-dynamic-fields copied to clipboard
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!