Swagger with ASP.NET Core Web API

APIs allow enterprises to exchange data between systems.  These APIs are just like any application, with the small difference that they don’t have a user interface.  Instead, APIs focus on database operations, validations, executing business rules and other background operations while providing a standard and consistent interface to these activities.

In the SOAP world, WSDL is used which is an XML document to describe the service.  WSDL specifies the location and the methods of the service using the XML syntax.  It also defines the message format and protocol details for a web service.

When APIs are exposed to partners or developers, it’s also necessary to provide the consumers of the APIs with a specification similar to WSDL.  This is where the Open API (Swagger) comes in.  Open API is a specification for describing, producing, consuming and visualizing RESTful services.  The specification creates the RESTful contract for the API, detailing all of its resources and operations in a human and machine-readable format for easy development, discovery, and integration. 


UPDATE - July 15, 2019 - Please refer to the following link for the most recent version of Swagger setup with ASP.NET Core.  It includes a sample project uploaded on Github

https://www.blogofpi.com/swagger-with-asp-net-core-web-api/


No Comments