mirror of https://github.com/zulip/zulip.git
tools: Add success message to check-schemas.
This commit is contained in:
parent
a4ab6065cd
commit
86c883ceb0
|
@ -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__":
|
||||
|
|
Loading…
Reference in New Issue