-
Notifications
You must be signed in to change notification settings - Fork 0
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
revertrisk: add pydantic validation #5
Conversation
* add a decorator that will be used for the payload argument validation * add validation in revertrisk * define the LiftWing class request function (the parent function) and let child classes just call super() with the appropriate validation class in the decorator Bug: T366015
72579bb
to
b9235fc
Compare
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.
Hi Ilias, thank you for working on this. I don't have much experience on pydantic, so not sure about the best practices here. But I checked their documentation and have some suggestions. :)
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.
LGTM :)
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 like this solution 😃
child classes just call super() with the appropriate validation class in the decorator
An example of making a request where the parameter
lang
is missing:Bug: T366015