This commit is contained in:
kamonwan taengsuk
2022-08-01 11:57:15 +07:00
parent 99c97bf4a5
commit 90139d9c12
2 changed files with 6 additions and 5 deletions

View File

@@ -37,6 +37,7 @@ namespace rmutr_report
};
services.AddSingleton(_setting);
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("reports", new OpenApiInfo {Title = "Reports API", Version = "v1"});
@@ -44,7 +45,7 @@ namespace rmutr_report
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath);
c.EnableAnnotations();
// c.MapType(typeof(TimeSpan?), () => new OpenApiSchema
// {
// Type = "string",