Addend description and contact of api creator

master
Jan Beníček 2023-11-30 18:10:15 +01:00
parent b2187fe3f3
commit 8597d5d0ba
1 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,5 @@
using API_SequentMicrosystems.Services; using API_SequentMicrosystems.Services;
using Microsoft.OpenApi.Models;
using System.Reflection; using System.Reflection;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
@ -25,6 +26,18 @@ namespace API_SequentMicrosystems
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath); c.IncludeXmlComments(xmlPath);
c.SwaggerDoc("v1", new OpenApiInfo
{
Version = "v1",
Title = "SM_API",
Description = "API of Measure and Control Device",
Contact = new OpenApiContact
{
Name = "Jan Beníèek",
Email = "jan00@benicek.xyz"
},
});
}); });
var app = builder.Build(); var app = builder.Build();