❔ Easy way to make a controller not visible in swagger ui

Hey guys this controller still in development so I would like to hide it out of swagger ui does ASP.NET have annotation to help me easily hide it ?
4 Replies
mtreit
mtreit2y ago
This answer seems to imply that no longer exists in Swashbuckle 5.x, but not sure: https://stackoverflow.com/questions/33176319/restrict-access-to-certain-api-controllers-in-swagger-using-swashbuckle-and-asp They give an example of marking the methods with [Obsolete] to cause them to be ignored.
TotechsStrypper
TotechsStrypperOP2y ago
Well obsolete != in development My teammate are easily confused
mtreit
mtreit2y ago
Yeah I find that a bit lame personally but it might be a workaround. Just add a comment.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity. Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?