mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(swagger): ✨ support NRTs
This commit is contained in:
parent
f7ced71f7c
commit
552d36eea7
3 changed files with 7 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using FilterLists.Archival.Application;
|
||||
using FilterLists.SharedKernel.Logging;
|
||||
using FilterLists.Archival.Api;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,14 @@
|
|||
|
||||
namespace FilterLists.Archival.Api;
|
||||
|
||||
internal static class SwaggerExtensions
|
||||
internal static class SwaggerConfigurationExtensions
|
||||
{
|
||||
public static void AddSwaggerGen(this IServiceCollection services)
|
||||
{
|
||||
services.AddSwaggerGen(o =>
|
||||
{
|
||||
o.SupportNonNullableReferenceTypes();
|
||||
|
||||
o.SwaggerDoc("v1", new OpenApiInfo
|
||||
{
|
||||
Title = "FilterLists Archival API",
|
||||
|
|
@ -25,8 +27,7 @@ public static void AddSwaggerGen(this IServiceCollection services)
|
|||
});
|
||||
|
||||
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
|
||||
o.IncludeXmlComments(xmlPath);
|
||||
o.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFile));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -9,6 +9,8 @@ public static void AddSwaggerGen(this IServiceCollection services)
|
|||
{
|
||||
services.AddSwaggerGen(o =>
|
||||
{
|
||||
o.SupportNonNullableReferenceTypes();
|
||||
|
||||
o.SwaggerDoc("v1",
|
||||
new OpenApiInfo
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue