File tree Expand file tree Collapse file tree
src/Swashbuckle.AspNetCore.Annotations Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44using Microsoft . OpenApi . Models ;
55using Swashbuckle . AspNetCore . SwaggerGen ;
66
7+ #if NET10_0
8+ using OpenApiTag = Microsoft . OpenApi . Models . References . OpenApiTagReference ;
9+ #else
10+ using OpenApiTag = Microsoft . OpenApi . Models . OpenApiTag ;
11+ #endif
12+
713namespace Swashbuckle . AspNetCore . Annotations
814{
915 public class AnnotationsOperationFilter : IOperationFilter
@@ -63,13 +69,15 @@ private static void ApplySwaggerOperationAttribute(
6369 if ( swaggerOperationAttribute . OperationId != null )
6470 operation . OperationId = swaggerOperationAttribute . OperationId ;
6571
66- // TODO Fix this
67- #if ! NET10_0_OR_GREATER
6872 if ( swaggerOperationAttribute . Tags != null )
6973 {
74+ #if NET10_0_OR_GREATER
75+ // TODO Get the document?
76+ operation . Tags = [ .. swaggerOperationAttribute . Tags . Select ( tagName => new OpenApiTag ( tagName , null ) ) ] ;
77+ #else
7078 operation . Tags = [ .. swaggerOperationAttribute . Tags . Select ( tagName => new OpenApiTag { Name = tagName } ) ] ;
71- }
7279#endif
80+ }
7381 }
7482
7583 public static void ApplySwaggerOperationFilterAttributes (
You can’t perform that action at this time.
0 commit comments