问题
I'm using the Swagger plugin for ServiceStack 3.9.59.0. I have a few endpoints, for example /selfchecknode, in my ServiceStack API that I don't want to show up in the Swagger UI.
Is there a declarative way, perhaps via a contract attribute, that I can use to hide specific endpoints from showing up in Swagger?
回答1:
The Security docs show how you can restrict visibility and access to ServiceStack. So you can hide it from being visible externally with:
[Restrict(VisibleInternalOnly = true)]
public class InternalAdmin { }
来源:https://stackoverflow.com/questions/19143059/how-can-i-hide-endpoints-from-swagger-ui-in-servicestack