filmov
tv
Chapter 3 - Learn to Use or Implement Swagger in .Net Core 3.1 & 3.0 Web API Project with Example
Показать описание
In this video, I am going to explain how we can implement swagger in the .net core 3.1 or 3.0 web API project. It is really super easy to use swagger with ASP.Net Core API. You just need to follow two steps to do it and those steps are below:
1. Install Nuget Packages
Swashbuckle.AspNetCore
In Configure services
services.AddSwaggerGen
In Configure Method
app.UseSwagger();
app.UseSwaggerUI
We just need to follow the above two steps to use swagger in .net core 3.1 and 3.0. It is really super easy to use Swashbuckle swagger with Asp.Net core web API.
It is always recommended to use Swashbuckle.AspNetCore with the .Net API project. There are also some other dependent packages with Swashbuckle.AspNetCore which we must need to install but we need not worry about that because when we install Swashbuckle.AspNetCore NuGet package then it automatically install all its dependent packages like Microsoft.OpenAPI, Swashbuckle.AspNetCore.Swagger, Swashbuckle.AspNetCore.SwaggerGen, Swashbuckle.AspNetCore.SwaggerUI, and Microsoft.Extensions.ApiDescription.Server
Download the project by going through the below link:
1. Install Nuget Packages
Swashbuckle.AspNetCore
In Configure services
services.AddSwaggerGen
In Configure Method
app.UseSwagger();
app.UseSwaggerUI
We just need to follow the above two steps to use swagger in .net core 3.1 and 3.0. It is really super easy to use Swashbuckle swagger with Asp.Net core web API.
It is always recommended to use Swashbuckle.AspNetCore with the .Net API project. There are also some other dependent packages with Swashbuckle.AspNetCore which we must need to install but we need not worry about that because when we install Swashbuckle.AspNetCore NuGet package then it automatically install all its dependent packages like Microsoft.OpenAPI, Swashbuckle.AspNetCore.Swagger, Swashbuckle.AspNetCore.SwaggerGen, Swashbuckle.AspNetCore.SwaggerUI, and Microsoft.Extensions.ApiDescription.Server
Download the project by going through the below link: