У меня есть конечная точка, которую я украсил api.expect()
, но я получаю эту ошибку.
{
"message": "Input payload validation failed",
"errors": {
"": "None is not of type u'object'"
}
}
Вот так выглядит мой код для простоты.
@api.route('/history')
class ProfitAnalyticsResource(Resource):
method_decorators = [jwt_required]
@api.expect(api.model('HistoryParameters', {
'jobId': fields.Integer(required=True, description='Job ID')
}), validate=True)
def get(self):
""" Gets the profit analytics report for the current user"""
return "test only"
Я проверяю это на Postman, передавая jobId
в качестве параметра url.