-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: adds @deprecated convenience decorator #4415
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
feat: adds @deprecated convenience decorator #4415
Conversation
|
Note: The Node 8 build failed due to a 404 from |
bajtos
left a comment
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.
Thank you @mschnee for the contribution. The changes look good to me at high level, I'd like @jannyHou to review OpenAPI-specific parts and @raymondfeng to review how the decorator is defined using metadata APIs.
|
My only concern is that @strongloop/loopback-maintainers What do you think? |
jannyHou
left a comment
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.
@mschnee Thank you so much for improving the OpenAPI series decorators! 🙇
I agree with @raymondfeng 's suggestion that uses a namespace to organize the operation decorators. Otherwise your code LGTM 👍
Thinking about it, it wouldn't hurt to explicitly default to setting |
dd54f76 to
adf9d77
Compare
packages/openapi-v3/src/__tests__/unit/decorators/deprecated.decorator.unit.ts
Outdated
Show resolved
Hide resolved
|
Squash will happen after all the tests are clean :) |
9ba74ed to
7ed2872
Compare
Partially implements: #4300
See: #4406
This has been split from #4406 as a more manageable, smaller PR.
Added
This PR adds
@deprecatedto Controller classes and methods, and marks all paths asdeprecated: truein accordance with the OpenAPI Operation Object specification.As the spec defines
deprecatedas an optional property, this feature will only adddeprecated: trueand neverdeprecated: false.Not (yet) supported
This PR does not add support for marking parameters as
deprecatedExamples
Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated