fix: cleanComments filter not applied to api.title and api.description in api-endpoint.njk
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
src/generator/templates/api-endpoint.njkを読み、api.titleとapi.descriptionの式を、cleanCommentsを使用している他の説明フィールドと比較してください。issueでは、適用されていない2つのフィルターと意図された式が示されています。両方のフィールドが一貫してサニタイズされれば完了です。このテンプレートを対象とするジェネレーターのテストを確認してください。
索引モデルが 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時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/google-api-nodejs-client のほかの issue
-
難易度 4/5 1〜2日 初心者へのやさしさ 5/100
googleapis/google-api-nodejs-client#4067 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 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 1週間以上 初心者へのやさしさ 10/100
googleapis/google-api-nodejs-client#4061 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 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
fonoster/routr#705 · コメント 1 件 ·
メンテナーはふだん 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 件 ·
メンテナーはふだん 1 日以内に返信