apryor6 / flask_accepts

Easy, opinionated Flask input/output handling mixing Marshmallow with flask-restx
BSD 3-Clause "New" or "Revised" License
169 stars 40 forks source link

The new partial keyword of accepts() breaks the marshmallow schema #87

Closed volfpeter closed 4 years ago

volfpeter commented 4 years ago

Hi,

The default value of partial in accepts() is False (the only correct default would be None, meaning let the schema do its job), and this argument is directly passed to schema.load(), overriding the schema instance's partial property and effectively breaking the passed in schema instance and the correct old behaviour.

Keeping this argument with a default value of None is acceptable, but I would avoid it because it would still violate several best practices and design principles, so I think it would be the best to reverse #81 or at least deprecate this argument.

Related issues: #80 and #62 (this should be the solution to partial loading).

Thanks and best regards, Peter