class BookSchema(BaseSchema): """Example Book schema.""" title = fields.String(required=True) date = fields.Date() author = fields.Nested(PersonSchema, required=True)
class PersonSchema(BaseSchema): """Example Person schema.""" name = fields.String(required=True) birth_date = fields.Date() email = fields.Email()