I am using ServiceStack for my custom service, in stand alone mode without IIS.
I would like to add documentation for my services beyond what /metadata
does. I thought to try the Swagger plug in.
I have added the plug-in command to my Config
public override void Configure(Funq.Container container)
{
SetConfig(new EndpointHostConfig()
{
DefaultRedirectPath = "index.html",
DebugMode = true,
WriteErrorsToResponse = true,
CustomHttpHandlers =
{
{ HttpStatusCode.Unauthorized, new AuthorizationErrorHandler() },
{ HttpStatusCode.Forbidden, new AuthorizationErrorHandler() },
{ HttpStatusCode.NotFound, new AuthorizationErrorHandler() }
}
});
// For automatic generation of documentation to APIs
Plugins.Add(new SwaggerFeature());
}
The existing services continue to work, but attempting to access
/swagger-ui/index.html
gives the not found error. Is there an additional step not clearly documented at
https://github.com/ServiceStack/ServiceStack/wiki/Swagger-API
Do I have to actually set up this page myself? If so, how?