2

I am trying to figure out a way to hide/remove complete services from the swagger-UI. According to the documentation on the servicestack swagger integration there should be a Exclude attribute. But unfortunately there is not.

Is there maybe another way to remove services from the swagger-ui? Removing them from the servicestack metadata would also be nice but is not necessary.

zlZimon
  • 2,334
  • 4
  • 21
  • 51

1 Answers1

3

From ServiceStack Swagger Docs:

Exclude Services from Metadata Pages

To exclude entire Services from showing up in Swagger or any other Metadata Services (i.e. Metadata Pages, Postman, NativeTypes, etc), annotate Request DTO’s with:

[Exclude(Feature.Metadata)]
public class MyRequestDto { ... }

The [Exclude] Attribute exists in ServiceStack.Interfaces project under the ServiceStack.DataAnnotations namespace.

mythz
  • 141,670
  • 29
  • 246
  • 390
  • I guess this is not part of the ServiceStack 3.9.71 which I am using? Is there any other way to archive that with the 3.9.71 version? – zlZimon Jan 26 '17 at 15:19
  • @zlZimon Feature was added in v4. Please use the `servicestack-bsd` tag for any questions for ServiceStack v3. – mythz Jan 26 '17 at 18:47