-
Notifications
You must be signed in to change notification settings - Fork 713
Closed
Labels
Description
It appears that the issue reported in #18 returned in Microsoft.AspNetCore.Mvc.Versioning v1.1.0-rc1.
When I use query string versioning and have code like this
[ApiVersion("1.0")]
[Route("[controller]")]
public class TestController : Controller
{
[HttpPost]
[Consumes("application/json")]
[Produces("application/json")]
public async Task<IActionResult> RegisterAsync([FromBody] [Required] AgentInfo agentInfo)
{
return CreatedAtAction(
"GetAgentInfoAsync",
new
{
agentSerialNumber = agentInfo.SerialNumber,
apiVersion = HttpContext.GetRequestedApiVersion().ToString()
},
await _agentRepository.CreateAsync(agentInfo.SerialNumber, agentInfo));
}
}
When I request the RegisterAsync the first time, it fails with a "No route matches the supplied values" error. All subsequent requests are successful.
I tried with v1.1.0-beta2 and there is no such a problem.