Working on a .net core app and using swagger
I recently upgraded .net core 2.1 to 3.1 and thus had to upgrade my swagger package as well from 4.0.1 to 6.3.0
With the above upgrades I see a very strange behavior to one of our api endpoints. Details as below:
Our Endpoint is as below:
[HttpGet("GetCount", Name = "GetCount")]
public async Task<IActionResult> GetUsersDataCount(string region, List<string> usersList)
{
//code logic here
}
How the above code shows in swagger is as below:
.net Core 2.1
With above version I can add the region as parameter and usersList as array(with add item) as shown in image1
.net Core 3.1
With above version I can add the region as parameter but usersList I have to add it as RequestBody as shown in image2
With the above changes this is breaking at the team consuming this API.
Any inputs on why its behaving this way or what changes do I need to make for this to work