Closed mendykrauss closed 1 year ago
Hi Mendykrauss. This is handled for you already under the hood. Pydantic models are typically constructed (with validation) from model(**json)
or model.parse_obj(**json)
- instead we're using model.construct(**json)
to build the models but skip validation.
We've overridden the method to support nested models, which isn't something that Pydantic supports out of the box.
You can check out the implementation here: https://github.com/HealthITAU/pyconnectwise/blob/6b8361ee4d01af910037bd5e4291b157151723f7/src/pyconnectwise/models/base/connectwise_model.py#L15-L49
How do we do that?