fix: cleanComments filter not applied to api.title and api.description in api-endpoint.njk
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 86/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
阅读 src/generator/templates/api-endpoint.njk,并将表达式 api.title 和 api.description 与其他使用 cleanComments 的描述字段进行比较。Issue 指明了缺少的两处过滤器应用以及预期的表达式。两个字段都得到一致的清理后,任务即完成;检查覆盖此模板的生成器测试。
由索引模型根据 Issue 内容生成。
描述
Summary
The cleanComments filter in filters.ts (lines 85–93) neutralises */ and /*
to prevent them from escaping JSDoc block comments in generated TypeScript. It is
applied to every method, parameter, and schema description field in
api-endpoint.njk, but is missing from api.title and api.description
at lines 58 and 60.
Expected behaviour
api.title and api.description are sanitised with cleanComments, consistent
with every other description field in the same template.
Actual behaviour
Both fields are rendered raw. The filter already exists and already handles this
case, it is simply not applied to these two fields.
Proposed fix
Two-line change in src/generator/templates/api-endpoint.njk:
Line 58
Before: * {{ api.title }}
After: * {{ api.title | cleanComments | safe }}
Line 60
Before: * {{ api.description | replace("\n", "\n * ") }}
After: * {{ api.description | cleanComments | safe | replace("\n", "\n * ") }}
I'm happy to submit a PR if the fix looks good.
- 主要语言
- TypeScript
- 星标
- 12.3k
- 派生
- 2k
- 平均合并
- 3 天 10 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-api-nodejs-client 的其他 Issue
-
难度 4/5 1-2 天 新手友好度 5/100
googleapis/google-api-nodejs-client#4067 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 1/100
googleapis/google-api-nodejs-client#4063 ·
维护者通常 2 天内回复
-
eMudhra/emSign CA compromise (October 2026): what Cloud SDK Node.js Libraries developers need to do未关闭
难度 1/5 1 小时以内 新手友好度 10/100
googleapis/google-api-nodejs-client#4062 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 10/100
googleapis/google-api-nodejs-client#4061 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 32/100
googleapis/google-api-nodejs-client#3932 · 1 条评论 ·
维护者通常 2 天内回复
查看 googleapis/google-api-nodejs-client 的全部 Issue
相似的 Issue
-
bug UI
难度 2/5 1-3 小时 新手友好度 70/100
wardian-app/Wardian#1746 ·
维护者通常 1 天内回复
-
area: interop area: sip-core v3
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 72/100
openclaw/openclaw#198551 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复