drf-dynamic-fields icon indicating copy to clipboard operation
drf-dynamic-fields copied to clipboard

Introduced NestedDynamicFieldsMixin to allow nested serializers to filter themselves.

Open albertisfu opened this issue 7 months ago • 2 comments

@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!

albertisfu avatar Jul 12 '25 00:07 albertisfu