Web APIs have a specification that was initially calledSwaggerbut nowgoesby the nameOpenAPI(https://github.com/OAI/OpenAPI-Specification). It is used todescribethe endpoints and versions offered by some APIs. The Swagger v3.0 specification contributed to the OpenAPI Initiative, and so Swagger is merged with OpenAPI.
It is still colloquially called Swagger in several places, andthereis also an open source implementation for .NET called Swashbuckle, which is available on NuGet as Swashbuckle.AspNetCore(https://github.com/domaindrivendev/Swashbuckle.AspNetCore). What this package does is inspect the action methods of your controllers and generate a JSON document that describes them. It also offers a simple web interface for invoking each of these action methods—how cool is that?
In order to use Swashbuckle.AspNetCore, we need to add a few NuGet packages—Swashbuckle.AspNetCore, .SwaggerGen, Swashbuckle.AspNetCore.SwaggerUI...