Skip to content

feat(docs): Markdown 展示路由中间件 (issue #4)#197

Open
yourtion wants to merge 1 commit into
mainfrom
feat/docs-middleware-show
Open

feat(docs): Markdown 展示路由中间件 (issue #4)#197
yourtion wants to merge 1 commit into
mainfrom
feat/docs-middleware-show

Conversation

@yourtion

@yourtion yourtion commented Jul 1, 2026

Copy link
Copy Markdown
Owner

关联 issue

Closes #4

改动内容

middlewares 此前已通过 .middlewares() 注册并经 DOC_FIELD 采集进文档数据,但四个生成器无一渲染。

  • Markdown 在「请求地址」行下方输出 中间件:<fn1>, <fn2>(取具名函数 fn.name,匿名函数跳过)
  • Swagger/Postman 不改动:OpenAPI 标准无 middleware 字段,强行加入不被消费方识别

测试

  • 新增 3 个回归测试(具名中间件 / 无中间件 / 匿名跳过)
  • 全量 npm run test:lib:317 → 320 全绿
  • tsc --noEmit 通过

版本

bump 3.2.1 → 3.2.5,已登记 MIGRATION

合并顺序提示

本系列共 4 个 PR,请按版本号顺序合并(3.2.2 → 3.2.3 → 3.2.4 → 3.2.5)。
⚠️ 合并时 MIGRATION.mdpackage.json 可能冲突,需 rebase 解冲突。

相关

issue #3(API 版本)已 wontfix 关闭:与「热路径零分配」「hook 不参与控制流」架构红线冲突,已有 groups[].prefix 替代方案。

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.57%. Comparing base (ffe0ffa) to head (62fd775).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #197      +/-   ##
==========================================
+ Coverage   92.54%   92.57%   +0.02%     
==========================================
  Files          28       28              
  Lines        2939     2948       +9     
  Branches      770      773       +3     
==========================================
+ Hits         2720     2729       +9     
  Misses        217      217              
  Partials        2        2              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

middlewares 此前已通过 .middlewares() 注册并经 DOC_FIELD 采集,
但四个生成器无一渲染。现 Markdown 在「请求地址」下方输出中间件函数名
列表(取具名函数 fn.name,匿名跳过)。Swagger/Postman 不受影响
(OpenAPI 标准无中间件字段)。

- 新增 3 个回归测试(具名中间件 / 无中间件 / 匿名跳过)
- bump 版本 3.2.1 → 3.2.5,登记 MIGRATION
@yourtion yourtion force-pushed the feat/docs-middleware-show branch from afaa71f to 62fd775 Compare July 9, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support middleware show in docs

1 participant