Just for info, I have seen people generate routes with patterns like:
`/foo?bar={bar}` just because of some legacy reasons. So removing the
query string in all cases might create issues.