add comments for swagger
This commit is contained in:
@@ -6,6 +6,7 @@ using AB.Services.Abstractions;
|
||||
using AB_API.Middleware;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Reflection;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
@@ -17,7 +18,18 @@ builder.Services.AddControllers().AddApplicationPart(typeof(AB.API.AssemblyRefer
|
||||
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen(c => c.SwaggerDoc("v1", new OpenApiInfo { Title = "AB-API", Version = "v1", Description = "An Api for the AB-Application" }));
|
||||
builder.Services.AddSwaggerGen(c =>
|
||||
{
|
||||
c.SwaggerDoc("v1", new OpenApiInfo
|
||||
{
|
||||
Title = "AB-API",
|
||||
Version = "v1",
|
||||
Description = "An Api for the AB-Application"
|
||||
});
|
||||
|
||||
var xmlFilename = $"{typeof(AB.API.AssemblyReference).Assembly.GetName().Name}.xml";
|
||||
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
|
||||
});
|
||||
|
||||
builder.Services.AddScoped<ICustomerService, CustomerService>();
|
||||
builder.Services.AddScoped<ICustomerRepository, CustomerRepository>();
|
||||
|
||||
Reference in New Issue
Block a user