From 762fb3639ac2041735260ab422dbafdb95835c07 Mon Sep 17 00:00:00 2001 From: mokarchi Date: Sat, 24 Feb 2024 11:07:25 +0330 Subject: [PATCH 1/3] Grammatical correction of some comments #699 --- .../AnnotationsOperationFilter.cs | 10 +++++----- .../AnnotationsSchemaFilter.cs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs index 23855e4dfe..1963e77546 100644 --- a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs +++ b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs @@ -1,8 +1,8 @@ -using System; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Collections.Generic; using System.Linq; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; namespace Swashbuckle.AspNetCore.Annotations { @@ -27,8 +27,8 @@ public void Apply(OpenApiOperation operation, OperationFilterContext context) } #endif - // NOTE: When controller and action attributes are applicable, action attributes should take precendence. - // Hence why they're at the end of the list (i.e. last one wins). + // NOTE: When controller and action attributes are applicable, action attributes should take priority. + // Hence, why they're at the end of the list (i.e. last one wins). // Distinct() is applied due to an ASP.NET Core issue: https://github.com/dotnet/aspnetcore/issues/34199. var allAttributes = controllerAttributes .Union(actionAttributes) diff --git a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs index 2f27ddb75f..259acf9955 100644 --- a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs +++ b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs @@ -1,10 +1,10 @@ -using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; namespace Swashbuckle.AspNetCore.Annotations { @@ -22,7 +22,7 @@ public void Apply(OpenApiSchema schema, SchemaFilterContext context) ApplyTypeAnnotations(schema, context); // NOTE: It's possible for both MemberInfo and ParameterInfo to have non-null values - i.e. when the schema is for a property - // within a class that is bound to a parameter. In this case, the MemberInfo should take precendence. + // within a class that is bound to a parameter. In this case, the MemberInfo should take precedence. if (context.MemberInfo != null) { From af38c9ce89970204c50b3507bfb5b6f69e0687fd Mon Sep 17 00:00:00 2001 From: Amir Date: Sun, 14 Apr 2024 10:54:01 +0330 Subject: [PATCH 2/3] Update AnnotationsOperationFilter.cs --- .../AnnotationsOperationFilter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs index 1963e77546..370108501c 100644 --- a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs +++ b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs @@ -1,8 +1,8 @@ -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System; +using System; using System.Collections.Generic; using System.Linq; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; namespace Swashbuckle.AspNetCore.Annotations { From d0497315c714f13ac89728190cf2997ec49b3e85 Mon Sep 17 00:00:00 2001 From: Amir Date: Sun, 14 Apr 2024 10:54:18 +0330 Subject: [PATCH 3/3] Update AnnotationsSchemaFilter.cs --- .../AnnotationsSchemaFilter.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs index 259acf9955..36101012fe 100644 --- a/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs +++ b/src/Swashbuckle.AspNetCore.Annotations/AnnotationsSchemaFilter.cs @@ -1,10 +1,10 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; namespace Swashbuckle.AspNetCore.Annotations {