Question

I have a REST WebAPI 2.0 written in C# .NET (framework 4.5.1) and looking for documenting it using ServiceStack's swagger add-on. Is it possible ?

As it appears to me that ServiceStack plugin for Swagger is only for MVC (as found examples on internet).

Was it helpful?

Solution

No - The Swagger plugin is for ServiceStack services only. Your service is written using WebAPI 2.0. So you would need to recreate your service as a ServiceStack service to make the Swagger plugin useable.

ServiceStack is an excellent replacement for WebAPI. If you do decide to move to the ServiceStack platform, the Swagger plugin can be used in MVC projects and self hosted web applications.See here for more information.

You may find this question ServiceStack vs ASP.NET WebApi useful.

Should you choose ServiceStack and have any problems implementing your service feel free to ask here.

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