How to make all fields "required" in SQLAlchemyAutoSchema in flask_marshmallow?

273 Views Asked by At

I am using SQLAlchemyAutoSchema to automatically generate fields for the model, by default, it sets all fields' required status to False. How can I make all fields required?

class ReferralOuctomeSchema(ma.SQLAlchemyAutoSchema):
    class Meta:
        model = my_model
        dump_only = ("id",)
        required = True
0

There are 0 best solutions below