Specify API returns types for swagger

This commit is contained in:
2025-06-16 20:28:37 +02:00
parent b989c43ec3
commit bcbf76fda6
10 changed files with 35 additions and 14 deletions

View File

@@ -25,10 +25,11 @@ public static class GetCars
return builder
.MapGet("cars", Endpoint)
.WithDescription("Returns all cars")
.WithTags("Cars");
.WithTags("Cars")
.Produces<ApiResponse>();
}
private static async Task<Ok<ApiResponse>> Endpoint(
private static async Task<IResult> Endpoint(
[AsParameters] Request request,
ApplicationDbContext dbContext,
CancellationToken cancellationToken)