-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use pydantic class to model search params #297
Conversation
138b657
to
5555483
Compare
91435cd
to
182e1d6
Compare
8851247
to
cdf3ad9
Compare
Could be nice to raise a custom Error that implement TypeError and that is catched and raised as a 400 instead of the default catchall (ValueError, TypeErorr) that might lead to an incorrect 400 |
@johangirod I know Python is not your main language. But any feedback you have on this restructuring PR is more than welcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it !
Well, I went thought it, but I must admit, I was quite lost between the language and also the project architecture, which I know nothing of. I like the diff count thought 😉 |
Since
Pydantic
classes have been used to refactor the response model, this PR usesPydantic V2
and its validator methods to parse and validate API requests.