I have a WCF REST based service that I would like to add Swagger to. I have installed Swagger.NET package, my project is using .NET 4.0. I have also enabled XML documentation, etc... but now I am not sure the best route from here.
When i launch http://localhost/SwaggerUI/index.html
I get the default page with the http://YOUR-URL-HERE:PORT/api/swagger
. I am not sure what url should go here. I did enable help of the service via: <standardEndpoint name="" helpEnabled="true" />
which does give me the ugly page here: http://localhost/api/help
-- when i plug that into Swagger i just get the result:
200 : OK http://localhost/api/help
What is the best way to proceed, i am not using WebApi but have many of the features available if that helps.
Use Swagger Inspector to quickly generate your OAS-based documentation for existing REST APIs by calling each end point and using the associated response to generate OAS-compliant documentation, or string together a series of calls to generate a full OAS document for multiple API endpoints.
You can use WCF to build RESTful services in . NET. REST (Representational State Transfer) is an architecture paradigm that conforms to the REST architecture principles. The REST architecture is based on the concept of resources: It uses resources to represent the state and functionality of an application.
Swagger AUTOMATIC Documentation Generation: Just throw a few lines above the resource definition and the documentation (json) is automatically generated by the module.
As of December 2015, there is an implementation of Swagger for Wcf now. You should check this out - Swagger for WCF - SwaggerWcf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With