Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

check_schema: Ignore operation field in schema validation for openapi.

shanukun7aa89289a3ae
diff --git a/tools/check-schemas b/tools/check-schemas
index 3e69cee2e70..38cf2507f3f 100755
--- a/tools/check-schemas
+++ b/tools/check-schemas
@@ -184,9 +184,8 @@ def validate_openapi_against_event_schema() -> None:
for sub_node in node:
name = sub_node["properties"]["type"]["enum"][0]
- for key in ["op", "operation"]:
- if key in sub_node["properties"]:
- name += "_" + sub_node["properties"][key]["enum"][0]
+ if "op" in sub_node["properties"]:
+ name += "_" + sub_node["properties"]["op"]["enum"][0]
name += "_event"