0

I am using the webapi help pages nuget package from Microsoft.

When i recently added a new controller, all my routes in the help page appear twice:

GET api/v2/something/{id}

and

GET api/v2/something?id={id}

How can i remove these duplicates?

Surprisingly for some older controllers that i added last year that did not happen.

The only difference that i can think of is that in the new controller i used dynamic as the response type, but i also used the ResponseTypeAttribute so in the help page the DTO models are displayed correctly.

zaitsman
  • 8,984
  • 6
  • 47
  • 79

1 Answers1

0

I recommend you use Swagger/Swashbuckle instead of the WebAPI help pages. You can install it via nuget. It will create a SwaggerConfig.cs in the App_Start folder. There might be some minor tweaks that you have to make depending on your requirements. Just check the documentation.

alltej
  • 6,787
  • 10
  • 46
  • 87
  • yes, we now about swashbuckle; however the choice was made for the api nuget, and i was hoping there is an answer for that package. – zaitsman Apr 30 '16 at 00:24