I've written some endpoints in webApi C#. On my dev machine, when I run my code and open swagger all endpoint are available as expected. When I deploy my code to another server when I run swagger I only see a couple of my post methods. I'm missing some post methods and all my get methods.
From the deployed server in swagger I receive an error: -
{"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://192.168.19.3/WooService/swagger/docs/v1"}]}
I have tried re-deploying several times, removing the service from IIS and recreating, but none of these seem to work. Can someone tell me where I'm likely to find this file on my local service and where I should place it on the server I'm deploying too, or if anyone knows another way to resolve this issue.
My Swagger config is very basic
using System.Web.Http;
using WebActivatorEx;
using WooService;
using Swashbuckle.Application;
[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")]
namespace WooService
{
public class SwaggerConfig
{
public static void Register()
{
var thisAssembly = typeof(SwaggerConfig).Assembly;
GlobalConfiguration.Configuration
.EnableSwagger(c =>
{
c.SingleApiVersion("v1", "WooService");
})
.EnableSwaggerUi();
}
}
}
As mentioned nothing has really changed other than a couple of endpoints. The config must be ok because it runs fine locally. Its on the deployed machine it's suddenly not showing all end points