标签:UI xml文件 foreach ati ocs pre clu services nba
1.swagger error 有详细的错误信息
2.swagger error 无详细的错误信息
3.swagger无注释
services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "Platform.Service.Enterprise.WebApi API", Version = "v1.0.0.0" }); c.DescribeAllEnumsAsStrings(); var basePath = PlatformServices.Default.Application.ApplicationBasePath; var docPath = Path.Combine(basePath, "Docs"); var docs = XMLUtil.CreateXPathDocumentsFromDirectory(docPath); docs.ForEach(xp => c.IncludeXmlComments(() => { return xp; })); });
app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Platform Enterprise WebApi API"); });
标签:UI xml文件 foreach ati ocs pre clu services nba
原文地址:https://www.cnblogs.com/panpanwelcome/p/9107553.html