Simplify sorting dependencies with Pydantic query models
Merged
FR
21h ago+30+30+01234567890123456789-59-59-01234567890123456789
Sorting parameters used a dynamic function generation pattern to be able to inject a query parameter with a dynamic type generated from an enum.
Now that FastAPI allows to use Pydantic models as query parameters, we can generate a Pydantic model dynamically instead, removing the need of a complete dynamic function builder, which feels more natural and less magic.