Files

43 lines
1.3 KiB
Python
Raw Permalink Normal View History

import sys, os
sys.path.insert(0, os.path.abspath("."))
from scratch.detailed_param_check import report
# Count diffs by type
diff_types = {}
for r in report:
for d in r["top_level_diffs"]:
t = d["type"]
diff_types[t] = diff_types.get(t, 0) + 1
print("Top-level diff counts by type:")
for t, cnt in sorted(diff_types.items(), key=lambda x: -x[1]):
print(f" {t}: {cnt}")
print("\n" + "="*80)
print("DETAILED PER-API BREAKDOWN")
print("="*80)
for idx, r in enumerate(report, 1):
top_diffs = r["top_level_diffs"]
sub_diffs = r.get("sub_ep_diffs", [])
has_sub_diffs = any(s["diffs"] for s in sub_diffs)
if not top_diffs and not has_sub_diffs:
continue
print(f"\n[{idx}] Section: {r['section']} | API: {r['api_title']}")
print(f" Nexus URL: {r['api_url']}")
print(f" MD Header: {r['md_header']} | URL: {r['md_url']}")
if top_diffs:
print(" [Top-Level Differences]:")
for d in top_diffs:
print(f" - [{d['type']}] Parameter '{d['param']}': {d['detail']}")
if sub_diffs:
for s in sub_diffs:
if s["diffs"]:
print(f" [Sub-Endpoint: {s['sub_title']} ({s['sub_path']})]:")
for d in s["diffs"]:
print(f" - [{d['type']}] Parameter '{d['param']}': {d['detail']}")