-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Make the Swagger UI display the deprecate tag #289
Comments
👍 Would love to see this. |
+1 |
+1 |
This is something that would be very useful for us. |
+1 |
thisIssue++; |
+1 |
I have all the code for this. I'm adding deprecated to the model in swagger-js (swagger-api/swagger-js#129), then will move on to creating a pull request for swagger-ui. |
This change requires a change in the model generation in swagger-js. That has already been merged, but I'm waiting for a release that we can use as a dependency here. If you're interested, this branch works with swagger-js snapshot: https://github.com/callenx/swagger-ui/tree/addDeprecated. |
Thank you Chris. On Fri, Oct 3, 2014 at 7:59 PM, Chris Allen notifications@github.com
|
this is now supported in develop_2.0 |
Sorry it's not clear to me how I can deprecate a controller method :( |
@CraigFoote - a controller method? |
Sorry, bad terminology I guess. My rest endpoints are documented with @API* annotations at the controller method level. I've marked the method @deprecated and added the Javadoc @deprecated but swagger UI renders as before, no indication of deprecation. Reading this issue leads me to think maybe I can edit one of those @API annotations to produce a change in the way swagger UI renders the endpoint, presumably with a strikethrough font. Am I on close? Thanks for the quick reply BTW. |
@CraigFoote - this is an issue with the library generating the Swagger definition rather than with swagger-ui as it probably doesn't parse the |
The current "Warning: deprecated" headline is only visible after you show the details of an operation. And since it has the same style as the remaining info, it is hardly visible. I created a pull request here: This change shows the deprecated operations strikethrough. |
Swagger-core respects and passes on the Java @deprecated annotation. It would be nice if Swagger-UI, by default, displayed this information on operations
The text was updated successfully, but these errors were encountered: