Skip to content

Conversation

@orgoro
Copy link

@orgoro orgoro commented Nov 9, 2025

This pull request adds support for extracting and including @title JSDoc annotations from TypeScript models and properties into the generated OpenAPI/Swagger schema definitions. It does so by updating the metadata generation pipeline to read the title annotation and propagate it through all relevant types, transformers, and spec generators. Comprehensive tests are added to verify that the title annotation appears correctly in the output schemas.

These changes ensure that descriptive title annotations are preserved from source code to API documentation, improving schema clarity for consumers.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues
closes #1656

Put closes #XXXX (where XXXX is the issue number) in your comment to auto-close the issue that your PR fixes.

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

Potential Problems With The Approach

Test plan

  • Added a new TestModelWithAnnotations fixture with @title JSDoc annotations at both model and property levels to verify extraction and propagation. (tests/fixtures/testModel.ts, [1]; [2]
  • Expanded unit and integration tests to validate that the generated schemas correctly include title for models and properties, including OpenAPI 3 specific checks. (tests/unit/swagger/schemaDetails3.spec.ts, [1]; [2]; [3]; [4]
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there orgoro 👋

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

We will review the following PR soon! 👀

@jefflembeck
Copy link
Contributor

Wasn't this issue closed with: #1657?

@orgoro
Copy link
Author

orgoro commented Nov 24, 2025

@jefflembeck

#1657 doesn't handle references and merges

Also the test in that was added in the PR was a title to Property and not Schema (or ref schema / property)

I use Tsoa and @ title behavior is unpredictable because of this

@orgoro
Copy link
Author

orgoro commented Dec 1, 2025

@jefflembeck what do you think we should do next?

@jefflembeck
Copy link
Contributor

@orgoro I'm gonna be honest, man. I have an internal fork of TSOA for my company. YMMV if that's the appropriate avenue to take for you. I don't have the overhead time to even attempt forking this project as a whole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants