烧瓶-忽略模型上不存在的属性

时间:2019-08-27 23:17:45

标签: flask flask-restplus

我写了一个带有一些属性的app.model,由于它们是required,因此验证工作正常。当API收到额外的属性时,它们不会被忽略。

person = api.model(
    'Person', {
        'name': fields.String(required=True,
                            description='The person email'),
        'age': fields.String(required=True, description='The person name'),
    })

是否有可能忽略其他属性或使整个请求失败,因为它具有比nameage多的属性?

0 个答案:

没有答案
相关问题