1
Some checks failed
API接口参数变更检测 / api-param-check (push) Has been cancelled

This commit is contained in:
2026-06-05 13:59:39 +08:00
parent e90b10b2ae
commit c21ba30c55
2 changed files with 12 additions and 6 deletions

View File

@@ -249,7 +249,9 @@ def compare_endpoints(
matched_removed: Set[str] = set()
matched_added: Set[str] = set()
# 1. HTTP 方法变更检测uri + controller + method_name 相同,但 method 不同)
# 1. HTTP 方法变更检测uri + controller 相同,但 method 不同)
# 放宽匹配条件:只要同一个 Controller 的同一个 URI 请求方式改变,就识别为「修改请求方式」
# 不再要求 method_name 相同(允许方法重命名场景)
# 如果同时有参数变更,生成两条独立报告(方法变更 + 参数变更),互不干扰
for r_key, r_ep in unmatched_removed:
for a_key, a_ep in unmatched_added:
@@ -258,7 +260,6 @@ def compare_endpoints(
if (
r_ep.uri == a_ep.uri
and r_ep.controller_class == a_ep.controller_class
and r_ep.method_name == a_ep.method_name
and r_ep.http_method != a_ep.http_method
):
# 先生成纯方法变更报告