Skip to content

Commit

Permalink
Merge pull request #41 from CanDIG/daisieh/statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh authored Nov 8, 2023
2 parents c587232 + 97c31b5 commit df88741
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions validate_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,11 @@ def validate_coverage(map_json, input_path=None, verbose=False):
mappings.VERBOSE = True

# read the schema and generate a scaffold
if "openapi_url" not in map_json:
return {"message": "No openapi_url schema available"}
schema = MoHSchema(map_json["openapi_url"])
if schema is None:
print(f"Did not find an openapi schema at {map_json['openapi_url']}; please check link")
return
return {"message": f"Did not find an openapi schema at {map_json['openapi_url']}; please check link"}

# if --input was specified, we can check data frame completeness coverage:
# if input_path is not None:
Expand All @@ -221,7 +222,8 @@ def validate_coverage(map_json, input_path=None, verbose=False):
# print(json.dumps(schema.validation_results, indent=4))
return {
"errors": schema.validation_errors,
"warnings": schema.validation_warnings
"warnings": schema.validation_warnings,
"statistics": schema.statistics
}

def main(args):
Expand Down

0 comments on commit df88741

Please sign in to comment.