An alternative is to pass in a filter type parameter with an enum, and a filter value with the value to use.
Example at: https://app.swaggerhub.com/api/craig_bayley/PublicAPIDemo/v1
It can be required or not, as you choose. However if one is required, they should both be.