Is there any way to get a stack trace or inner exceptions on Swashbuckle/Swagger errors? At some point, it stopped working. I'm not sure if it was when I upgraded from .Net Core 2.0 to 2.1, but I'm pretty sure it was still working after that. When I navigate to myapidomain/swagger/index.html I get this error:
Which is not very helpful. It was working 2 or so weeks ago... I didn't change any Swagger configuration. It's the same as it's always been:
public void ConfigureServices(IServiceCollection services)
{
...
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new Info
{
Version = "v1",
Title = "My.API",
Description = "Test"
});
});
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
app.UseDeveloperExceptionPage();
else
app.UseHsts();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "PropWorx API V1");
});
...
}
I'm using Swashbuckle.AspNetCore 3.0.0 on an ASP.Net Core 2.1 Web API.
swagger/v1/swagger.json
– Fong