When a request payload is a JSON array, the validator throws an
flask_validator.exceptions.ValidatorAttributeError: ('AttributeError', 'json passed, expecting json or form_data or query_string or headers')
JSON Arrays are converted to list and the validator does not validate list.
Say my JSON payload is:
[ 5, 6, 7, 8]
it throws:
File "/Users/chumaumenze/Documents/projects/flask-validator/flask_validator/validator_engine.py", line 49, in validate
validation_result = validators[validator_name](data.get(field, None),\
AttributeError: 'list' object has no attribute 'get'
. . . .
File "/Users/chumaumenze/Documents/projects/flask-validator/flask_validator/validator_engine.py", line 35, in inner_wrapper
raise ValidatorAttributeError('AttributeError',\
flask_validator.exceptions.ValidatorAttributeError: ('AttributeError', 'json passed, expecting json or form_data or query_string or headers')
When a request payload is a JSON array, the validator throws an
flask_validator.exceptions.ValidatorAttributeError: ('AttributeError', 'json passed, expecting json or form_data or query_string or headers')
JSON Arrays are converted to list and the validator does not validate list.
Say my JSON payload is:
it throws: