You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
API Platform allows to define filters based on properties in a related object. For example: /teams?club.slug=my-club. I don't like the fact that my internal properties need to be exposed in this filters. Maybe it's not that problematic in this case, but when filtering on objects 'further away' it can get messy: /matches?pool.competition.season.id=2023&pool.competition.region.slug=north and I'm exposing more of the data model. It would be really nice to be able to squash that into /matches?season=2023®ion=north.
Now, the only solution is to create custom filters, but it might be possible to allow adding an alias to the #[ApiFilter] attribute? However the fact that multiple properties are allowed makes the format of such configuration complicated.
The text was updated successfully, but these errors were encountered:
#2400
adds to the list of things to improve... For now just create your own filter? Closing as I want to centralize filter issues to #2400 for a future filter refactoring!
Description
API Platform allows to define filters based on properties in a related object. For example:
/teams?club.slug=my-club
. I don't like the fact that my internal properties need to be exposed in this filters. Maybe it's not that problematic in this case, but when filtering on objects 'further away' it can get messy:/matches?pool.competition.season.id=2023&pool.competition.region.slug=north
and I'm exposing more of the data model. It would be really nice to be able to squash that into/matches?season=2023®ion=north
.Now, the only solution is to create custom filters, but it might be possible to allow adding an alias to the
#[ApiFilter]
attribute? However the fact that multiple properties are allowed makes the format of such configuration complicated.The text was updated successfully, but these errors were encountered: