Is your feature request related to a problem? Please describe.
Currently we can define singular filters and add them one by one to controllers, however, this gets frustrating when we have dozens of API endpoints that have a set of 3 or 4 filters repeated in each one. For example:
Having these 3 filters repeated in multiple endpoints is error-prone in the case something is to be changed, for example we may want to add another filter on top of the 3 that does some other checks on the session, now we must go through each file and add that filter for all of them, and we may forget to add it for one of the API endpoints.
Describe the solution you'd like
Add Composite Filters, they are filters that have names just like normal filters, and they have a list of strings that contain the names of individual filters.
These composite filters can be added onto controllers like normal filters, and the composite filter will add its children into the controller automatically.
Describe alternatives you've considered
Macros, and they are quite ugly:
Is your feature request related to a problem? Please describe. Currently we can define singular filters and add them one by one to controllers, however, this gets frustrating when we have dozens of API endpoints that have a set of 3 or 4 filters repeated in each one. For example:
Having these 3 filters repeated in multiple endpoints is error-prone in the case something is to be changed, for example we may want to add another filter on top of the 3 that does some other checks on the session, now we must go through each file and add that filter for all of them, and we may forget to add it for one of the API endpoints.
Describe the solution you'd like Add Composite Filters, they are filters that have names just like normal filters, and they have a list of strings that contain the names of individual filters. These composite filters can be added onto controllers like normal filters, and the composite filter will add its children into the controller automatically.
Describe alternatives you've considered Macros, and they are quite ugly: