Skip to content

Fix empty @returns JSDoc tags - #1866

Open
soumajitgh wants to merge 1 commit into
lukeautry:masterfrom
soumajitgh:fix/orphan-returns-jsdoc
Open

Fix empty @returns JSDoc tags#1866
soumajitgh wants to merge 1 commit into
lukeautry:masterfrom
soumajitgh:fix/orphan-returns-jsdoc

Conversation

@soumajitgh

Copy link
Copy Markdown

Summary

  • Ignore empty and type-only @returns JSDoc tags during parameter metadata generation.
  • Add regression coverage for both forms.

Root cause

TypeScript represents these return tags without a comment, and the parameter-tag validation treated them as orphan parameter annotations.

Testing

  • yarn workspace tsoa-tests exec mocha unit/swagger/definitionsGeneration/metadata.spec.ts --grep 'controllerWithJsDocResponseDescriptionGeneration'

Fixes #1741

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there soumajitgh 👋

Thank you and congrats 🎉 for opening your first PR on this project.✨

We will review the following PR soon! 👀

@soumajitgh
soumajitgh marked this pull request as ready for review July 10, 2026 17:18
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.

Orphan tag error with empty @returns jsdocs on 6.6.0

1 participant