feat: generate JSDoc comments from schema descriptions (including @deprecated)#348
Open
jonaslagoni wants to merge 9 commits intomainfrom
Open
feat: generate JSDoc comments from schema descriptions (including @deprecated)#348jonaslagoni wants to merge 9 commits intomainfrom
jonaslagoni wants to merge 9 commits intomainfrom
Conversation
…precated) Resolves #338 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
✅ Deploy Preview for the-codegen-project canceled.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
src/codegen/generators/typescript/channels/protocols/http/client.ts
Outdated
Show resolved
Hide resolved
Removed the 'export' keyword from the generated HTTP client function declaration to match the pattern used by all other protocol renderers (NATS, Kafka, MQTT, AMQP, WebSocket, EventSource), which use separate export statements at the bottom of the file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates test snapshots to match the HTTP client function signature change from the previous commit that removed the 'export' keyword from generated HTTP client functions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The init command tests were failing in CI because Node.js outputs deprecation warnings (like the punycode module warning) to stderr. The tests were asserting stderr === '', which failed when these warnings were present. Added a helper function `expectNoActualErrors()` that filters out Node.js deprecation warnings while still failing on actual errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add escapeJSDocDescription to renderJSDocParameters for parameter descriptions - Apply escapeJSDocDescription to fallbackDescription in renderChannelJSDoc This prevents JSDoc comment blocks from breaking when API spec descriptions contain `*/` (comment terminator) or newlines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the unused renderJSDocParameters function from utils.ts and its corresponding tests. This function was never imported or called in production code - only the test file used it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused escapeJSDocDescription import from utils.ts - Remove extra blank line before realizeChannelName function - Remove blank line padding in test block 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
The name field was declared in the parameters type but never accessed inside the function - only jsDoc was used. Removing it eliminates unnecessary boilerplate across all protocol files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Resolves #338
See implementation details in
.claude/thoughts/issue-338-generate-jsdoc-comments-from-s-2026-03-13/plan.mdTest Plan
npm run prepare:prpasses🤖 Generated with Claude Code
Note
Medium Risk
Medium risk because it changes TypeScript code generation output across multiple protocols and payload models; downstream consumers may see doc/comment diffs and potential formatting edge cases (multiline/
*/escaping) despite no runtime behavior changes intended.Overview
Adds spec-driven JSDoc to generated TypeScript channel/client functions across HTTP, WebSocket, EventSource, AMQP, Kafka, MQTT, and NATS by plumbing
description/deprecatedmetadata into renderers and centralizing formatting inrenderChannelJSDoc(with escaping and optional@deprecated).Extends payload model generation to emit property/class documentation via Modelina’s
TS_DESCRIPTION_PRESET, and removes the oldrenderJSDocParametershelper.Updates/expands tests and snapshots to assert the new JSDoc output, adds unit tests for the new JSDoc utilities, and relaxes
initcommand tests to ignore Node.js deprecation warnings on stderr.Written by Cursor Bugbot for commit 8c44ad2. This will update automatically on new commits. Configure here.