Not supported by Swagger 2.0: Multiple operations with path

后端 未结 9 2266
盖世英雄少女心
盖世英雄少女心 2020-12-29 03:15

I have integrated swagger in WebApi 2 application. It works fine when application has single controller. When I added second controller in the application. I got following

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 03:34

    Sorry, I answered it too late: the solution to the problem is to remove any route versioning attribute on the controller if you have more than one controller; the swagger picks route from the WebApiConfig by default. Note: You do not need to provide the action name or the route. Just make sure that no two actions have the same name nor signature; of course, it can never compile.

提交回复
热议问题