Do not try to parse non-json request examples as json

pull/977/head
Kegan Dougal 9 years ago
parent 87b6dd845e
commit 8c4d7f5051

@ -34,7 +34,7 @@ def check_parameter(filepath, request, parameter):
example = None
try:
example_json = schema.get('example')
if example_json:
if example_json and not schema.get("format") == "byte":
example = json.loads(example_json)
except Exception as e:
raise ValueError("Error parsing JSON example request for %r" % (

Loading…
Cancel
Save