New Angular based web version #1
@@ -17,6 +17,7 @@ public static class CreateCar
|
|||||||
return builder
|
return builder
|
||||||
.MapPost("cars", Endpoint)
|
.MapPost("cars", Endpoint)
|
||||||
.WithTags("Cars")
|
.WithTags("Cars")
|
||||||
|
.WithDescription("Creates a new car")
|
||||||
.Produces<Response>(201)
|
.Produces<Response>(201)
|
||||||
.ProducesValidationProblem();
|
.ProducesValidationProblem();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public static class DeleteCar
|
|||||||
return builder
|
return builder
|
||||||
.MapDelete("cars/{id:guid}", Endpoint)
|
.MapDelete("cars/{id:guid}", Endpoint)
|
||||||
.WithTags("Cars")
|
.WithTags("Cars")
|
||||||
|
.WithDescription("Deletes a car by ID")
|
||||||
.Produces(204)
|
.Produces(204)
|
||||||
.Produces(404);
|
.Produces(404);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public static class UpdateCar
|
|||||||
return builder
|
return builder
|
||||||
.MapPut("cars/{id:guid}", Endpoint)
|
.MapPut("cars/{id:guid}", Endpoint)
|
||||||
.WithTags("Cars")
|
.WithTags("Cars")
|
||||||
|
.WithDescription("Updates a car by ID")
|
||||||
.Produces<Response>()
|
.Produces<Response>()
|
||||||
.ProducesValidationProblem()
|
.ProducesValidationProblem()
|
||||||
.Produces(404);
|
.Produces(404);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public static class CreateConsumption
|
|||||||
return builder
|
return builder
|
||||||
.MapPost("consumptions", Endpoint)
|
.MapPost("consumptions", Endpoint)
|
||||||
.WithTags("Consumptions")
|
.WithTags("Consumptions")
|
||||||
|
.WithDescription("Creates a new consumption entry")
|
||||||
.Produces<Response>(201);
|
.Produces<Response>(201);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public static class DeleteConsumption
|
|||||||
return builder
|
return builder
|
||||||
.MapDelete("consumptions/{id:guid}", Endpoint)
|
.MapDelete("consumptions/{id:guid}", Endpoint)
|
||||||
.WithTags("Consumptions")
|
.WithTags("Consumptions")
|
||||||
|
.WithDescription("Deletes a consumption entry by ID")
|
||||||
.Produces(204)
|
.Produces(204)
|
||||||
.Produces(404);
|
.Produces(404);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public static class GetConsumption
|
|||||||
return builder
|
return builder
|
||||||
.MapGet("consumptions/{id:guid}", Endpoint)
|
.MapGet("consumptions/{id:guid}", Endpoint)
|
||||||
.WithTags("Consumptions")
|
.WithTags("Consumptions")
|
||||||
|
.WithDescription("Returns a single consumption entry by ID")
|
||||||
.Produces<Response>()
|
.Produces<Response>()
|
||||||
.Produces(404);
|
.Produces(404);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public static class UpdateConsumption
|
|||||||
return builder
|
return builder
|
||||||
.MapPut("consumptions/{id:guid}", Endpoint)
|
.MapPut("consumptions/{id:guid}", Endpoint)
|
||||||
.WithTags("Consumptions")
|
.WithTags("Consumptions")
|
||||||
|
.WithDescription("Updates a consumption entry by ID")
|
||||||
.Produces<Response>()
|
.Produces<Response>()
|
||||||
.ProducesValidationProblem()
|
.ProducesValidationProblem()
|
||||||
.Produces(404);
|
.Produces(404);
|
||||||
|
|||||||
Reference in New Issue
Block a user