30
ASP.NET Core-Swashbuckle不创建swagger.json文件
我在获取Swashbuckle.AspNetCore(1.0.0)包来生成任何输出时遇到麻烦。我阅读了swagger.json文件,应将其写入“〜/ swagger / docs / v1”。但是,我没有得到任何输出。 我从一个全新的ASP.NET Core API项目开始。我应该提到这是ASP.NET Core2。该API可以正常工作,并且我可以从值控制器中检索值。 我的启动类的配置与本文(GitHub上的Swashbuckle.AspNetCore)完全相同。 public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) …