1
votes

NotSupportedException: Ambiguous HTTP method for action - AAON.Insiite.Api.Controllers.TokenController.Get (AAON.Insiite.Api). Actions require an explicit HttpMethod binding for Swagger 2.0

I've read the several questions regarding this issue on SO but none of the solutions have worked.

I've tried:

  • Adding [HttpGet] to the method in question.
  • Adding [NonAction] to the method in question.
  • Changing access modifier of method to Protected.
  • Deleting the method still throws an exception for the now deleted method.
  • Cleared Visual Studio Cache

I've tried clearing my visual studio cache but to no avail.

    [HttpGet]
    public IActionResult Get()
    {
        return Ok("Running");
    }
1
Which library/framework is this question about - Swashbuckle or Swagger-Net or something else? - Helen

1 Answers

-11
votes

The issue was a controller naming convention. Solved.