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.

openapi: Remove confusing check for 200 responses.

Anders Kaseorg0cee3bee0068
diff --git a/zerver/openapi/openapi.py b/zerver/openapi/openapi.py
index 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 remaining
if (endpoint, method) in EXCLUDE_DOCUMENTED_ENDPOINTS: # nocoverage
return 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 schema
if status_code.startswith("4"):