File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
NorthwindCRUD/Controllers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 44using Microsoft . AspNetCore . Mvc ;
55using NorthwindCRUD . Models . Dtos ;
66using NorthwindCRUD . Services ;
7+ using Swashbuckle . AspNetCore . Annotations ;
78
89namespace NorthwindCRUD . Controllers
910{
@@ -41,8 +42,8 @@ public ActionResult<SalesDto[]> GetSalesByCategoryAndYear([FromQuery] [Required]
4142 [ Authorize ]
4243 public ActionResult < SalesDto [ ] > GetSalesByCountry (
4344 string country ,
44- [ FromQuery ] [ Required ] string startDate ,
45- [ FromQuery ] [ Required ] string endDate )
45+ [ FromQuery ] [ Required ] [ DataType ( DataType . Date ) ] [ SwaggerParameter ( "Start date in YYYY-MM-DD format" ) ] string startDate ,
46+ [ FromQuery ] [ Required ] [ DataType ( DataType . Date ) ] [ SwaggerParameter ( "End date in YYYY-MM-DD format" ) ] string endDate )
4647 {
4748 try
4849 {
You can’t perform that action at this time.
0 commit comments