I have a pydantic (v2) model containing some fields with default values. I would like on some occasions for these models to be used in a “strict mode” where the default values are no longer available and every field must be supplied when using model_validate.
Is there an easy way to do this with minimal boilerplate (e.g. subclassing all the models one by one). I was hoping for maybe just an attribute to add to a model definition which would use then allow the context parameter on model_validate to be used to specify whether or not apply any default. Or maybe there is already something built into pydantic which i have missed?