Commit 642a00e5 authored by Pierre Dittgen's avatar Pierre Dittgen

Add repair=True to validata-api call

parent 59ae4078
......@@ -451,11 +451,12 @@ def validate(schema_instance: SchemaInstance, source: ValidataResource):
params = {
"schema": schema_instance.url,
"url": source.url,
"repair": True,
}
response = requests.get(config.API_VALIDATE_ENDPOINT, params=params, headers=headers)
else:
files = {'file': (source.filename, source.build_reader())}
data = {"schema": schema_instance.url}
data = {"schema": schema_instance.url, "repair": True}
response = requests.post(config.API_VALIDATE_ENDPOINT, data=data, files=files, headers=headers)
except requests.ConnectionError as err:
logging.exception(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment