mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	openapi: Remove confusing check for 200 responses.
This error message didn’t make sense for the check as written, and our OpenAPI document already provides the expected format for our 200 responses. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Anders Kaseorg
					
				
			
			
				
	
			
			
			
						parent
						
							bb699f7ee3
						
					
				
				
					commit
					0cee3bee00
				
			@@ -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"):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user