In the last article, you can find the idea of how to introduce field filtering for your APIs. My simplified Content Filter allows for providing negative or positive filtering. The first one tells which fields Filter removes from the target response. The latter one tells which fields should be available in the response. Today I show you how I have implemented this using DataWeave language.
Filterable DataWeave Module
Okay, our input is straightforward. The Content Filter has two input arguments, like in the diagram below