Specify API returns types for swagger
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user