Typora版本 0.9.x.x 可用,0.11.18 打开提示旧版本需要更新。
swagger configureServices
services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo
{
Title = "xxx .Net Core API 文档",
Version = "v1",
Description = "接口描述",
Contact = new Microsoft.OpenApi.Models.OpenApiContact()
{
Name = "xxx",
Url= new Uri("http://www.xxx.com")
}
});
//swagger xml file
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
options.IncludeXmlComments(xmlPath);
});