Question

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?

Was it helpful?

Solution

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 { }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top