-
Notifications
You must be signed in to change notification settings - Fork 528
title: add from annotation #1810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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! 👀
|
Wasn't this issue closed with: #1657? |
|
#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 |
|
@jefflembeck what do you think we should do next? |
|
@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. |
| import { versionMajorMinor } from 'typescript'; | ||
| import { getDefaultExtendedOptions } from '../../fixtures/defaultOptions'; | ||
| import { EnumDynamicPropertyKey, TestModel } from '../../fixtures/testModel'; | ||
| import { title } from 'process'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh?
|
Does this intentionally omit refEnums? |
…erty, with corresponding tests
|
I think this should now be complete. Lmk if I missed something, but I think we want to pass through property titles, not silently swallow them. |
This pull request adds support for extracting and including
@titleJSDoc annotations from TypeScript models and properties into the generated OpenAPI/Swagger schema definitions. It does so by updating the metadata generation pipeline to read thetitleannotation and propagate it through all relevant types, transformers, and spec generators. Comprehensive tests are added to verify that thetitleannotation appears correctly in the output schemas.These changes ensure that descriptive
titleannotations are preserved from source code to API documentation, improving schema clarity for consumers.All Submissions:
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:
Potential Problems With The Approach
Test plan
TestModelWithAnnotationsfixture with@titleJSDoc annotations at both model and property levels to verify extraction and propagation. (tests/fixtures/testModel.ts, [1]; [2]titlefor models and properties, including OpenAPI 3 specific checks. (tests/unit/swagger/schemaDetails3.spec.ts, [1]; [2]; [3]; [4]