swagger .net core API ambiguous HTTP Action debugging

后端 未结 7 2046
[愿得一人]
[愿得一人] 2021-02-12 10:49

Implementing Swashbuckle/Swagger with .net Core 2 API I am now receiving the 500 error when accessing swagger.json:

NotSupportedException: Ambiguous HTTP

7条回答
  •  轮回少年
    2021-02-12 11:33

    I tried different solutions but what it worked for me was adding the route inside the attributes as stated above. I.E: [HttpPost("yourRoute/create")] one of the issues was that I have 2 get methods so I changed their names and added the route to the attributes as I said.

提交回复
热议问题