如果在iis网站下,建立了api子应用,打开swagger时,会出现not fund json的错误,需要修改默认配置
app.UseSwagger(c =>
{
c.RouteTemplate = "swagger/{documentname}/swagger.json";
});
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/api/swagger/v1/swagger.json", "Api v1");//iis网站下建立了api子应用\
});