This line shows that fields' required flag will only depend on whether they are nullable and have a default value:
|
kwargs["required"] = not column.nullable and not _has_default(column) |
But we're running into cases where certain fields (eg relations for which we want to enforce loading through the foreign key, but still want dumping the whole nested schema) are marked as required even though they are also dump_only.
Any reason for not including not dump_only as a condition for marking as required?
This line shows that fields'
requiredflag will only depend on whether they are nullable and have a default value:marshmallow-sqlalchemy/src/marshmallow_sqlalchemy/convert.py
Line 427 in 3754933
But we're running into cases where certain fields (eg relations for which we want to enforce loading through the foreign key, but still want dumping the whole nested schema) are marked as
requiredeven though they are alsodump_only.Any reason for not including
not dump_onlyas a condition for marking asrequired?