fastapi-filter
fastapi-filter copied to clipboard
drop support for comma separated strings in favor is native lists
FastAPI does not natively support comma separated lists in query parameters. Instead, lists are ingested via repeating key patterns. Forcing comma separated lists also breaks docs and schemas. It is preferred to be consistent with how FastAPI natively handles lists.
In order for FastAPI to parse a field as a list, it must be either annotated with a Query or have its default value be a Query. We can do this in FilterDepends. Checking for Union types is no longer needed and splitting comma string is no longer needed.
Deploy Preview for fastapi-filter ready!
| Name | Link |
|---|---|
| Latest commit | 704992e0c2377b87aebf97d85fc729df67a146d0 |
| Latest deploy log | https://app.netlify.com/sites/fastapi-filter/deploys/67c86bd00c87550008385b0b |
| Deploy Preview | https://deploy-preview-620--fastapi-filter.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
As this will not pass checks because of tests are using comma separated strings, I will just leave this PR as a reference in case the future maintainer needs a hint on how to support native python lists