diff --git a/tools/check-schemas b/tools/check-schemas index 9e954b1912..c120243fcd 100755 --- a/tools/check-schemas +++ b/tools/check-schemas @@ -74,7 +74,6 @@ EXEMPT_OPENAPI_NAMES = [ "message_event", # tuple handling "muted_topics_event", - "realm_filters_event", # bots, delivery_email, profile_data "realm_user_add_event", # OpenAPI is incomplete @@ -84,6 +83,12 @@ EXEMPT_OPENAPI_NAMES = [ "reaction_remove_event", ] +# This is a list of events still documented in the OpenAPI that +# are deprecated and no longer checked in event_schema.py. +DEPRECATED_EVENTS = [ + "realm_filters_event", +] + def get_event_checker(event: Dict[str, Any]) -> Optional[Callable[[str, Dict[str, Any]], None]]: name = event["type"] @@ -192,7 +197,8 @@ def validate_openapi_against_event_schema() -> None: name += "_event" if not hasattr(event_schema, name): - print("WARNING - NEED SCHEMA to match OpenAPI", name) + if name not in DEPRECATED_EVENTS: + print("WARNING - NEED SCHEMA to match OpenAPI", name) continue openapi_type = from_openapi(sub_node)