From 0005595703b2f3f7083ce4ba19bf5770057c75bd Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Tue, 25 Oct 2022 17:51:37 +0800 Subject: . --- code/api/src/Utilities/SwaggerGenOptionsExtensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'code/api/src/Utilities/SwaggerGenOptionsExtensions.cs') diff --git a/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs b/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs index 0a7e07f..9b70194 100644 --- a/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs +++ b/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs @@ -1,5 +1,5 @@ #nullable enable -using IOL.GreatOffice.Api.Endpoints.V1; +using IOL.GreatOffice.Api.Endpoints; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Controllers; using Swashbuckle.AspNetCore.SwaggerGen; @@ -10,7 +10,7 @@ public static class SwaggerGenOptionsExtensions { /// /// Updates Swagger document to support ApiEndpoints.

- /// For controllers inherited from :
+ /// For controllers inherited from :
/// - Replaces action Tag with [namespace]
///
public static void UseApiEndpoints(this SwaggerGenOptions options) { @@ -22,7 +22,7 @@ public static class SwaggerGenOptionsExtensions throw new InvalidOperationException($"Unable to determine tag for endpoint: {api.ActionDescriptor.DisplayName}"); } - if (actionDescriptor.ControllerTypeInfo.GetBaseTypesAndThis().Any(t => t == typeof(V1_EndpointBase))) { + if (actionDescriptor.ControllerTypeInfo.GetBaseTypesAndThis().Any(t => t == typeof(EndpointBase))) { return new[] { actionDescriptor.ControllerTypeInfo.Namespace?.Split('.').Last() }; @@ -34,7 +34,7 @@ public static class SwaggerGenOptionsExtensions } public static IEnumerable GetBaseTypesAndThis(this Type type) { - Type? current = type; + var current = type; while (current != null) { yield return current; current = current.BaseType; -- cgit v1.3