tools: Add success message to check-schemas.

This commit is contained in:
Gaurav Pandey 2021-03-10 21:14:21 +05:30 committed by Steve Howell
parent a4ab6065cd
commit 86c883ceb0
1 changed files with 3 additions and 2 deletions

View File

@ -107,7 +107,7 @@ def check_event(name: str, event: Dict[str, Any]) -> None:
print(f"\n{EVENTS_JS} has bad data for {name}:\n\n")
raise
else:
print(f"NEED SCHEMA: {name}")
print(f"WARNING - NEED SCHEMA: {name}")
def read_fixtures() -> Dict[str, Any]:
@ -191,7 +191,7 @@ def validate_openapi_against_event_schema() -> None:
name += "_event"
if not hasattr(event_schema, name):
print("NEED SCHEMA to match OpenAPI", name)
print("WARNING - NEED SCHEMA to match OpenAPI", name)
continue
openapi_type = from_openapi(sub_node)
@ -225,6 +225,7 @@ def run() -> None:
for name, event in fixtures.items():
check_event(name, event)
validate_openapi_against_event_schema()
print("Successful check. All tests passed.")
if __name__ == "__main__":