Skip to content
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

Closed
eyala opened this issue Aug 21, 2013 · 16 comments
Closed

Make the Swagger UI display the deprecate tag #289

eyala opened this issue Aug 21, 2013 · 16 comments
Milestone

Comments

@eyala
Copy link

eyala commented Aug 21, 2013

Swagger-core respects and passes on the Java @deprecated annotation. It would be nice if Swagger-UI, by default, displayed this information on operations

@martypitt
Copy link

👍 Would love to see this.

@robmoore
Copy link

+1

@jonocodes
Copy link

+1

@lmprice
Copy link

lmprice commented Aug 25, 2014

This is something that would be very useful for us.

@hanszolo
Copy link

+1

@iamcrunch
Copy link

thisIssue++;

@cadupont
Copy link

cadupont commented Oct 1, 2014

+1

@iamcrunch
Copy link

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.

@iamcrunch
Copy link

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.

@cadupont
Copy link

cadupont commented Oct 4, 2014

Thank you Chris.

On Fri, Oct 3, 2014 at 7:59 PM, Chris Allen notifications@github.com
wrote:

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.


Reply to this email directly or view it on GitHub
#289 (comment).

@fehguy fehguy modified the milestone: v2.1.0-M1 Jan 28, 2015
@fehguy
Copy link
Contributor

fehguy commented Jan 31, 2015

this is now supported in develop_2.0

@fehguy fehguy closed this as completed Jan 31, 2015
@CraigFoote
Copy link

Sorry it's not clear to me how I can deprecate a controller method :(

@webron
Copy link
Contributor

webron commented Mar 27, 2015

@CraigFoote - a controller method?

@CraigFoote
Copy link

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.

@webron
Copy link
Contributor

webron commented Mar 28, 2015

@CraigFoote - this is an issue with the library generating the Swagger definition rather than with swagger-ui as it probably doesn't parse the @Deprecated annotation. I'd suggest opening an issue on that library.

@jkoepcke
Copy link
Contributor

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:

#1740

This change shows the deprecated operations strikethrough.

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

No branches or pull requests