diff --git a/services/Directory/FilterLists.Directory.Api/Endpoints.cs b/services/Directory/FilterLists.Directory.Api/Endpoints.cs index 02607fcb0..376c6bb5a 100644 --- a/services/Directory/FilterLists.Directory.Api/Endpoints.cs +++ b/services/Directory/FilterLists.Directory.Api/Endpoints.cs @@ -17,7 +17,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { LanguagesTag }; + operation.Tags = new HashSet { new(LanguagesTag) }; operation.Summary = "Gets the languages targeted by the FilterLists."; operation.OperationId = nameof(GetLanguages); return Task.CompletedTask; @@ -30,7 +30,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { LicensesTag }; + operation.Tags = new HashSet { new(LicensesTag) }; operation.Summary = "Gets the licenses applied to the FilterLists."; operation.OperationId = nameof(GetLicenses); return Task.CompletedTask; @@ -43,7 +43,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { FilterListsTag }; + operation.Tags = new HashSet { new(FilterListsTag) }; operation.Summary = "Gets the FilterLists."; operation.OperationId = nameof(GetLists); return Task.CompletedTask; @@ -64,7 +64,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces(StatusCodes.Status404NotFound) .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { FilterListsTag }; + operation.Tags = new HashSet { new(FilterListsTag) }; operation.Summary = "Gets the details of the FilterList."; operation.OperationId = nameof(GetListDetails); operation.Parameters = @@ -88,7 +88,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { MaintainersTag }; + operation.Tags = new HashSet { new(MaintainersTag) }; operation.Summary = "Gets the maintainers of the FilterLists."; operation.OperationId = nameof(GetMaintainers); return Task.CompletedTask; @@ -101,7 +101,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { SoftwareTag }; + operation.Tags = new HashSet { new(SoftwareTag) }; operation.Summary = "Gets the software that subscribes to the FilterLists."; operation.OperationId = nameof(GetSoftware); return Task.CompletedTask; @@ -114,7 +114,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { SyntaxesTag }; + operation.Tags = new HashSet { new(SyntaxesTag) }; operation.Summary = "Gets the syntaxes of the FilterLists."; operation.OperationId = nameof(GetSyntaxes); return Task.CompletedTask; @@ -127,7 +127,7 @@ internal static void MapEndpoints(this WebApplication app) .Produces>() .AddOpenApiOperationTransformer((operation, context, ct) => { - operation.Tags = new HashSet { TagsTag }; + operation.Tags = new HashSet { new(TagsTag) }; operation.Summary = "Gets the tags of the FilterLists."; operation.OperationId = nameof(GetTags); return Task.CompletedTask; diff --git a/services/Directory/FilterLists.Directory.Api/OpenApi/OpenApiTags.cs b/services/Directory/FilterLists.Directory.Api/OpenApi/OpenApiTags.cs index ae7208261..fb8629042 100644 --- a/services/Directory/FilterLists.Directory.Api/OpenApi/OpenApiTags.cs +++ b/services/Directory/FilterLists.Directory.Api/OpenApi/OpenApiTags.cs @@ -89,8 +89,8 @@ internal sealed class TagDescriptionsDocumentFilter : IDocumentFilter { public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) { - swaggerDoc.Tags = - [ + swaggerDoc.Tags = new HashSet + { LanguagesTag, LicensesTag, FilterListsTag, @@ -98,7 +98,7 @@ public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) SoftwareTag, SyntaxesTag, TagsTag - ]; + }; } } } \ No newline at end of file