From 68fbdbca2d50cb2ca5c7552dbffc58b27c42bfb9 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 2 Oct 2026 07:25:25 -0500 Subject: [PATCH] refactor(api): simplify endpoint metadata configuration * Remove WithOpenApi() calls * Use AllowAnonymous() instead of WithMetadata(new AllowAnonymousAttribute()) * Rename the Tester Swagger tag to Testers --- src/Endpoints/TesterEndpoints.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Endpoints/TesterEndpoints.cs b/src/Endpoints/TesterEndpoints.cs index 6412110..b44a97c 100644 --- a/src/Endpoints/TesterEndpoints.cs +++ b/src/Endpoints/TesterEndpoints.cs @@ -12,8 +12,7 @@ public static void MapTesterEndpoints(this WebApplication app) { var testerGroup = app .MapGroup("/api/testers") - .WithTags("Tester") - .WithOpenApi(); + .WithTags("Testers"); testerGroup.MapPost("/", async ( [FromBody]CreateTesterRequest request, @@ -52,7 +51,7 @@ public static void MapTesterEndpoints(this WebApplication app) return response.ToHttpResult(); }) .Produces() - .WithMetadata(new AllowAnonymousAttribute()); + .AllowAnonymous(); testerGroup.MapGet("/", async ( [AsParameters]GetTestersRequest request, @@ -71,7 +70,7 @@ public static void MapTesterEndpoints(this WebApplication app) return response.ToHttpResult(); }) .Produces>() - .WithMetadata(new AllowAnonymousAttribute()); + .AllowAnonymous(); testerGroup.MapGet("/access-history", async ( [AsParameters]GetAllTestersAccessHistoryRequest request,