[Feature Request] Apply filters only on specific operations
See original GitHub issueHello,
I want to apply a NumericFilter for a customerId property, and I want that filter to only be available to the collection operation for admins (I have one collection operation that gets all the orders for the current customer and another for admins that can retrieve all orders).
This is currently not possible without a custom filter, even though the filterProperty function from the NumericFilter class has the $operationName as an argument.
And even after creating the custom filter, I also have to override the getDescription function since that function does not have the operation as an argument so I can not generate swagger documentation for only a specific operation.
I do not know why this is not possible by default, it seems to me that this is a very useful feature. Thank you.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
@d0niek So that works?Then I am guessing that this was implemented at some point then. Haven’t had the time to test it myself yet but will take a look.
I put filters under operations like here:
and everything works 😃