FilterSchema to take in arbitrary query parameters #1156
Unanswered
alekb-modsy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
In the project I'm working on I have the following usecase. We have a metadata json field in a model and we have an API that returns its instances. We are utilizing the
FilterSchema
to filter by predefined attributes. My question and struggle is - can I also extend the FilterSchema to accept any attribute with the formatmetadata__*
in the query parameters so that I can filter by it? So far I've tried overriding the init function, adding a pydantic root_validator and experimented with pydantic's extra fields but none seem to work as I expect.Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions