Open
Description
This issue has been moved from a ticket on Developer Community.
This code causes an ASP0023 warning on both [HttpGet("[action]")]
statements. The warning is incorrect because the [action]
route makes the two endpoints unique.
[ApiController]
[Route("v{version:apiVersion}/Test")]
[ApiVersion("1.0")]
[Authorize]
public class TestController : ControllerBase
{
/// <summary> /v1/Test/SomeAction [GET] </summary>
[HttpGet("[action]")]
public IActionResult SomeAction()
{
return Ok();
}
/// <summary> /v1/Test/AnotherAction [GET] </summary>
[HttpGet("[action]")]
public IActionResult AnotherAction()
{
return Ok();
}
}
Original Comments
Feedback Bot on 1/7/2024, 09:34 PM:
(private comment, text removed)
Original Solutions
(no solutions)