Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
openapi: Remove confusing check for 200 responses.
Anders Kaseorg0cee3bee0068
diff --git a/zerver/openapi/openapi.py b/zerver/openapi/openapi.pyindex 9da070d4028..7b6c80eef95 100644--- a/zerver/openapi/openapi.py+++ b/zerver/openapi/openapi.py@@ -372,11 +372,6 @@ def validate_against_openapi_schema(# Return true for endpoints with only response documentation remainingif (endpoint, method) in EXCLUDE_DOCUMENTED_ENDPOINTS: # nocoveragereturn True- # Check if the response matches its code- if status_code.startswith("2") and (- content.get("result", "success").lower() != "success"- ): # nocoverage- raise SchemaError("Response is not 200 but is validating against 200 schema")# Code is not declared but appears in various 400 responses. If# common, it can be added to 400 response schemaif status_code.startswith("4"):