drf-dynamic-fields
drf-dynamic-fields copied to clipboard
Added support to filter nested fields
#42 replacement for this PR
@albertisfu here is an alternative approach where we do allow each serializer the ability to filter itself instead of orchestrating the filtering from the parent.
Does this approach work for your use-case? You can see that this cuts down on the logic spread throughout the fields method, and contains the hard work of finding the fields to filter / omit in some helper functions - I'm sure these could be simplified further - they are just gpt code. (for example I don't like while statements as a rule)