required=False is the default behavior. We should remove this option to prevent mistakes where callers mistakenly think required=True is the default behavior.
The following definitions are equivalent
class Post:
author = fields.StringField()
class Post:
author = fields.StringField(required=False)
This is different.
class Post:
author = fields.StringField(required=True)
With this change, it would only be possible to write:
class Post:
author = fields.StringField()
class Post:
author = fields.StringField(required=True)
The following would error:
class Post:
author = fields.StringField(required=False)
required=False is the default behavior. We should remove this option to prevent mistakes where callers mistakenly think required=True is the default behavior.
The following definitions are equivalent
This is different.
With this change, it would only be possible to write:
The following would error: