From 1a7e4030616e14821d13cc285a93f3348188aa09 Mon Sep 17 00:00:00 2001 From: martincostello Date: Thu, 13 Jul 2023 14:46:22 +0100 Subject: [PATCH] .NET 8 preparation - Remove ExcludeByAttribute as duplicating the defaults. - Fix code analysis warning identified in #1808. --- Directory.Build.props | 1 - src/LondonTravel.Site/Swagger/ExampleFilter.cs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 58fa7ad50..5892209f8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -52,7 +52,6 @@ true cobertura,json [AspNet.Security.OAuth*]*,[Refit*]*,[xunit.*]* - System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute 69 diff --git a/src/LondonTravel.Site/Swagger/ExampleFilter.cs b/src/LondonTravel.Site/Swagger/ExampleFilter.cs index b62ae9ee4..c2fad6ba2 100644 --- a/src/LondonTravel.Site/Swagger/ExampleFilter.cs +++ b/src/LondonTravel.Site/Swagger/ExampleFilter.cs @@ -88,9 +88,9 @@ internal static IOpenApiAny FormatAsJson(object? examples, JsonSerializerOptions /// The type of the attribute(s) to find. /// The API description. /// - /// An containing any found attributes of type . + /// An array containing any found attributes of type . /// - private static IList GetAttributes(ApiDescription apiDescription) + private static T[] GetAttributes(ApiDescription apiDescription) where T : Attribute { IEnumerable attributes = Enumerable.Empty();