fix: check file exist
This commit is contained in:
parent
f42caa3a45
commit
21055176ac
@ -44,8 +44,11 @@ public static class SwaggerConfiguration
|
||||
}
|
||||
});
|
||||
|
||||
options.IncludeXmlComments(Path.Combine(basePath, "docs.xml"));
|
||||
options.IncludeXmlComments(Path.Combine(basePath, "ApiDtoDocs.xml"));
|
||||
if (File.Exists(Path.Combine(basePath, "docs.xml")))
|
||||
options.IncludeXmlComments(Path.Combine(basePath, "docs.xml"));
|
||||
|
||||
if (File.Exists(Path.Combine(basePath, "ApiDtoDocs.xml")))
|
||||
options.IncludeXmlComments(Path.Combine(basePath, "ApiDtoDocs.xml"));
|
||||
});
|
||||
|
||||
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
|
||||
|
Loading…
Reference in New Issue
Block a user