Files
Neo-ZQYY/docs/audit/changes/2026-02-14__json-refresh-md-patch.md

3.1 KiB
Raw Permalink Blame History

审计记录:全量 JSON 刷新 + MD 文档补全 + 数据路径修正

  • 日期2026-02-14Asia/Shanghai
  • Prompt-IDP20260214-060000、P20260214-061000
  • 原始原因:用户发现 JSON 样本为单条快照,缺少条件性字段,导致 .md 文档与实际 API 返回不一致。要求重新获取 100 条数据、遍历所有记录提取最全字段、补全 .md 文档、更新比对报告。
  • 直接原因:旧 JSON 样本仅含 1 条记录无法覆盖所有可能字段api_registry.json 中 17 个端点的 data_path 与实际 API 返回路径不一致。

Changed

文件 变更类型 说明
scripts/refresh_json_and_audit.py 新建 全量 JSON 刷新 + MD 比对 + 自动补全脚本
docs/api-reference/api_registry.json 修改 17 个端点的 data_path 修正为实际 API 返回路径
docs/api-reference/samples/*.json 修改 全部 24 个 JSON 样本刷新为 100 条数据
docs/api-reference/*.md24 个) 修改 新增"响应数据路径"行10 个文档补全共 39 个缺失字段
docs/reports/json_refresh_audit.json 新建 JSON vs MD 比对结果24/24 通过)
docs/reports/api_ods_comparison_v3_fixed.md 更新 重新生成比对报告API独有 0→4ODS独有 47→12完全对齐 9→15
docs/reports/api_ods_comparison_v3_fixed.json 更新 对应 JSON 格式报告

补全字段的 10 个文档

文档 补全字段数
table_fee_transactions.md 3activity_discount_amount, order_consumption_type, real_service_money
tenant_goods_master.md 1commoditycode
store_goods_sales_records.md 7ordergoodsid, siteid, sitename 等)
store_goods_master.md 11goodsstockwarninginfo, time_slot_sale, audit_status 等)
member_profiles.md 2person_tenant_org_id, person_tenant_org_name
member_stored_value_cards.md 7assistantcarddeduct, cardsettlededuct 等)
member_balance_changes.md 3cardtypename, principalbalance, tenantname
group_buy_packages.md 2tableareanamelist, tenanttableareaidlist
group_buy_redemption_records.md 2coupon_channel, coupon_remark
site_tables_master.md 1tableprofile

api_registry.json data_path 修正17 个)

修正前多数为 data.list,修正后为实际 API 返回路径,例如:

  • assistant_accounts_master: data.listdata.assistantInfos
  • settlement_records: data.listdata.settleList
  • member_profiles: data.listdata.tenantMemberInfos
  • 等(详见 refresh_json_and_audit.py 运行日志)

变更影响审查

  • api_registry.json 的 data_path 仅被 scripts/compare_api_ods*.pyscripts/refresh_json_and_audit.py 读取,不被 ETL 运行时代码使用
  • 无逻辑改动,无运行时影响
  • 不需要更新 product.md / tech.md / README.md

Risk / Verify

  • 风险:纯文档和脚本变更,无运行时影响
  • 验证:python scripts/refresh_json_and_audit.py 输出 24/24 通过
  • 验证:python scripts/run_compare_v3_fixed.py 重新生成比对报告
  • 回归范围:无(不影响 ETL Connector 或数据库)