fix: cleanComments filter not applied to api.title and api.description in api-endpoint.njk
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- backend-api-design
Research direction
Read src/generator/templates/api-endpoint.njk and compare the api.title and api.description expressions with the other description fields that use cleanComments. The issue identifies the two missing filter applications and the intended expressions. Done means both fields are sanitized consistently; check the generator tests that cover this template.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 2k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-api-nodejs-client
-
Difficulty 4/5 1-2 days Newbie friendliness 5/100
googleapis/google-api-nodejs-client#4067 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
googleapis/google-api-nodejs-client#4063 ·
Maintainers usually reply within 2 days
-
eMudhra/emSign CA compromise (October 2026): what Cloud SDK Node.js Libraries developers need to doOpen
Difficulty 1/5 Under an hour Newbie friendliness 10/100
googleapis/google-api-nodejs-client#4062 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
googleapis/google-api-nodejs-client#4061 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
googleapis/google-api-nodejs-client#3932 · 1 comment ·
Maintainers usually reply within 2 days
All issues in googleapis/google-api-nodejs-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pieterjanscheir/belgica#201 ·
Maintainers usually reply within 1 day
-
accessibility
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
numerique-gouv/lasuite-landingpage#311 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
oxc-project/tsgolint#1362 ·
Maintainers usually reply within 1 day
-
bug external xai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
langchain-ai/langchain#41854 ·
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
nemchik/biome-plugin-suitescript#137 ·
Maintainers usually reply within 1 day