Do not try to parse non-json request examples as json
This commit is contained in:
parent
87b6dd845e
commit
8c4d7f5051
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue