swagger summary
This commit is contained in:
@@ -6,6 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Resend;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -195,6 +196,18 @@ builder.Services.AddSwaggerGen(c =>
|
||||
c.OperationFilter<AdminProductExampleOperationFilter>();
|
||||
c.OperationFilter<CustomerAddressExampleOperationFilter>();
|
||||
c.OperationFilter<CustomerOrderExampleOperationFilter>();
|
||||
|
||||
var apiXmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
var apiXmlPath = Path.Combine(AppContext.BaseDirectory, apiXmlFile);
|
||||
c.IncludeXmlComments(apiXmlPath);
|
||||
|
||||
var appXmlFile = "Webshop.Application.xml"; // Der Name der DLL des Application-Projekts + .xml
|
||||
var appXmlPath = Path.Combine(AppContext.BaseDirectory, appXmlFile);
|
||||
if (File.Exists(appXmlPath))
|
||||
{
|
||||
c.IncludeXmlComments(appXmlPath);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
Reference in New Issue
Block a user