Swagger 配置调整

parent f47de63f
......@@ -19,20 +19,20 @@ public static void AddSwaggerConfiguration(this IServiceCollection services)
{
c.SwaggerDoc("v1", new OpenApiInfo { Version = "v1.0", Title = "绩效API接口" });
//var xmlPath = new string[]
//{
// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml"),
// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.DtoModels.xml"),
// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.EntityModels.xml"),
//};
var xmlPath = new string[]
{
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml"),
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.DtoModels.xml"),
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.EntityModels.xml"),
};
//foreach (var item in xmlPath)
//{
// c.IncludeXmlComments(item, true);
//}
foreach (var item in xmlPath)
{
c.IncludeXmlComments(item, true);
}
var xmlPathsss = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml");
c.IncludeXmlComments(xmlPathsss, true);
//var xmlPathsss = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml");
//c.IncludeXmlComments(xmlPathsss, true);
// Token绑定到ConfigureServices
var security = new OpenApiSecurityRequirement
......
......@@ -48,6 +48,9 @@
<Content Update="wwwroot\Performance.Api.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\Performance.DtoModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\Performance.EntityModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment