แก้ปัญหา swagger สร้าง page Error เมื่อใช้งาน WebREportDesigner
**** ยังไม่ได้ เลยเอาออกจากระบบไปก่อน *****
This commit is contained in:
parent
9b3efd8981
commit
ec3395d970
7 changed files with 52 additions and 55 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
|
|
@ -19,6 +20,9 @@ namespace BMA.EHR.Report.Service
|
|||
public void Configure(SwaggerGenOptions options)
|
||||
{
|
||||
// add swagger document for every API version discovered
|
||||
|
||||
|
||||
|
||||
foreach (var description in _provider.ApiVersionDescriptions)
|
||||
{
|
||||
options.EnableAnnotations();
|
||||
|
|
@ -26,8 +30,9 @@ namespace BMA.EHR.Report.Service
|
|||
options.SwaggerDoc(
|
||||
description.GroupName,
|
||||
CreateVersionInfo(description));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
|
||||
{
|
||||
In = ParameterLocation.Header,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue