Open ethanli722 opened 9 months ago
I'm upgrading from 0.22.2 to 1.1.0 and many tests are failing. Previously I was overriding my Schema's init and preforming my validations in there.
class MySchema(Schema): def __init__(self, **data: dict[str, Any]): super().__init__(**data) self._validate_args()
However in 1.1.0 this no longer works as init is no longer called. Is there an alternative I can do?
django-ninja internally is using the Pydantic "Model validators"
https://docs.pydantic.dev/latest/concepts/validators/#model-validators
You might want to look into and try that.
I'm upgrading from 0.22.2 to 1.1.0 and many tests are failing. Previously I was overriding my Schema's init and preforming my validations in there.
However in 1.1.0 this no longer works as init is no longer called. Is there an alternative I can do?