[Fix] Proxy: Repair Stale HTTP_METHODS Reference In Lazy OpenAPI Snapshot

_normalize_operation_ids referenced HTTP_METHODS but only HTTP_METHOD_SUFFIXES is defined, raising NameError on snapshot generation and failing test_lazy_openapi_snapshot. The constant was renamed in an earlier merge without updating these two references; values are identical sets of HTTP method names.
This commit is contained in:
Yuneng Jiang 2026-05-01 15:11:56 -07:00
parent ae9065137c
commit 61a3923b71
No known key found for this signature in database

View File

@ -61,12 +61,12 @@ def _normalize_operation_ids(paths: Dict[str, Dict]) -> None:
if not isinstance(path_ops, dict):
continue
methods = {method for method in path_ops if method in HTTP_METHODS}
methods = {method for method in path_ops if method in HTTP_METHOD_SUFFIXES}
if not methods:
continue
for method, operation in path_ops.items():
if method not in HTTP_METHODS or not isinstance(operation, dict):
if method not in HTTP_METHOD_SUFFIXES or not isinstance(operation, dict):
continue
operation_id = operation.get("operationId")