diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-10-24 06:29:23 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-10-24 06:29:23 +0200 |
| commit | 585c5c8537eb21dfc9f16108548e63d9ced3d971 (patch) | |
| tree | 1582bc45dcab585ec7204f1570019b2ca8de36c5 /code/api/src/Utilities/SwaggerGenOptionsExtensions.cs | |
| parent | 4b42c5235482fe0d3811b4e2936614c79e20d970 (diff) | |
| download | greatoffice-585c5c8537eb21dfc9f16108548e63d9ced3d971.tar.xz greatoffice-585c5c8537eb21dfc9f16108548e63d9ced3d971.zip | |
feat: Before move to FastEndpoints
Diffstat (limited to 'code/api/src/Utilities/SwaggerGenOptionsExtensions.cs')
| -rw-r--r-- | code/api/src/Utilities/SwaggerGenOptionsExtensions.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs b/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs index a2dcf7a..0a7e07f 100644 --- a/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs +++ b/code/api/src/Utilities/SwaggerGenOptionsExtensions.cs @@ -1,8 +1,8 @@ #nullable enable +using IOL.GreatOffice.Api.Endpoints.V1; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Controllers; using Swashbuckle.AspNetCore.SwaggerGen; -using BaseRoute = IOL.GreatOffice.Api.Endpoints.V1.BaseRoute; namespace IOL.GreatOffice.Api.Utilities; @@ -10,7 +10,7 @@ public static class SwaggerGenOptionsExtensions { /// <summary> /// Updates Swagger document to support ApiEndpoints.<br/><br/> - /// For controllers inherited from <see cref="BaseRoute"/>:<br/> + /// For controllers inherited from <see cref="V1_EndpointBase"/>:<br/> /// - Replaces action Tag with <c>[namespace]</c><br/> /// </summary> 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(BaseRoute))) { + if (actionDescriptor.ControllerTypeInfo.GetBaseTypesAndThis().Any(t => t == typeof(V1_EndpointBase))) { return new[] { actionDescriptor.ControllerTypeInfo.Namespace?.Split('.').Last() }; |
