Question

Been looking at different options for providing auto generated API Documentation and Swagger seems to be up there.

However when trying this out for the first time I'm getting exceptions on start up.

Running Visual Studio 2013.
Create new Web API project.
Using Package Manager, run:

Install-Package Swagger.Net & Install-Packager Swagger.Net.UI

Making sure we've enable the XML documentation we get this exception:

Method 'GetDocumentation' in type 'Swagger.Net.XmlCommentDocumentationProvider' 
from assembly 'Swagger.Net, Version=0.5.1.0, Culture=neutral, PublicKeyToken=null' 
does not have an implementation.

Does anyone else know of a step we are missing? We found & followed this:
https://github.com/Swagger-Net/Swagger.Net/wiki
https://github.com/Swagger-Net/Swagger.Net/blob/master/README.md

Was it helpful?

Solution

Swagger doesn't support .NET 4.5 - Had to get the source code out from git and modify it to work with 4.5.

Right click the project and set the target framework in there

OTHER TIPS

I have made a library for use with mvc that generates the documentation for you based on attributes. It may be what your looking for.

There is dcoumentation in the repository on github just click the project site link. Hope this helps

Try using Swashbuckle.

Based on Swagger as far as I know and it worked first time for me...

https://github.com/domaindrivendev/Swashbuckle

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top