swagger .net core API ambiguous HTTP Action debugging

后端 未结 7 1897
[愿得一人]
[愿得一人] 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:30

    I Had the same problem, and was because i have done the override of the Ok() method ,returning an OkObjectResult. The solution was change it from public to protected

提交回复
热议问题