Page MenuHomePhabricator

Add pydantic validation to revertrisk model in liftwing-python package
Closed, ResolvedPublic

Description

I'd like to add payload validation using pydantic to the liftwing-python package, so that the user is informed on which fields are optional and how they should use each model.

We start with an example for revertrisk-language-agnostic and then we'll start doing the same for the rest of the models as soon as they are added to the package.

The downside to this approach is that we're adding validation logic to the client which means that in the event of a change in the server we would have to update the client as well (maintain 2 different points for the same thing).
The upside is that we avoid making a request to Lift Wing which will mean much less requests in the unfortunate event that the client is not making proper requests.