diff --git a/src/API/ApiModule.cs b/src/API/ApiModule.cs index 4fae8957f..f752438ad 100644 --- a/src/API/ApiModule.cs +++ b/src/API/ApiModule.cs @@ -62,7 +62,7 @@ public static IEndpointRouteBuilder MapApiEndpoints(this IEndpointRouteBuilder b .Produces("The current UTC date and time.") .RequireCors("DefaultCorsPolicy") .WithName("Time") - .WithOperationDescription("Gets the current UTC time."); + .WithSummary("Gets the current UTC time."); builder.MapGet("/tools/guid", ( [SwaggerParameterExample("The format for which to generate a GUID.", "D")] string? format, @@ -89,7 +89,7 @@ public static IEndpointRouteBuilder MapApiEndpoints(this IEndpointRouteBuilder b .Produces("A GUID was generated successfully.") .ProducesProblem("The specified format is invalid.") .WithName("Guid") - .WithOperationDescription("Generates a GUID.") + .WithSummary("Generates a GUID.") .WithProblemDetailsResponseExample(); builder.MapPost("/tools/hash", (HashRequest? request) => @@ -163,7 +163,7 @@ public static IEndpointRouteBuilder MapApiEndpoints(this IEndpointRouteBuilder b .Produces("The hash was generated successfully.") .ProducesProblem("The specified hash algorithm or output format is invalid.") .WithName("Hash") - .WithOperationDescription("Generates a hash of some plaintext for a specified hash algorithm and returns it in the required format.") + .WithSummary("Generates a hash of some plaintext for a specified hash algorithm and returns it in the required format.") .WithProblemDetailsResponseExample(); builder.MapGet("/tools/machinekey", ( @@ -204,7 +204,7 @@ public static IEndpointRouteBuilder MapApiEndpoints(this IEndpointRouteBuilder b .Produces("The machine key was generated successfully.") .ProducesProblem("The specified decryption or validation algorithm is invalid.") .WithName("MachineKey") - .WithOperationDescription("Generates a machine key for a Web.config configuration file for ASP.NET.") + .WithSummary("Generates a machine key for a Web.config configuration file for ASP.NET.") .WithProblemDetailsResponseExample(); return builder; diff --git a/src/API/Extensions/RouteHandlerBuilderExtensions.cs b/src/API/Extensions/RouteHandlerBuilderExtensions.cs index 29c4fd33b..4631fdd10 100644 --- a/src/API/Extensions/RouteHandlerBuilderExtensions.cs +++ b/src/API/Extensions/RouteHandlerBuilderExtensions.cs @@ -100,23 +100,6 @@ internal static RouteHandlerBuilder ProducesProblem( "application/problem+json"); } - /// - /// Adds the to the metadata for all builders produced by builder. - /// - /// The . - /// The operation summary. - /// The optional operation description. - /// - /// A that can be used to further customize the endpoint. - /// - internal static RouteHandlerBuilder WithOperationDescription( - this RouteHandlerBuilder builder, - string summary, - string? description = null) - { - return builder.WithMetadata(new SwaggerOperationAttribute(summary, description)); - } - /// /// Adds the for to the metadata for all builders produced by builder. ///