1. Create a .net core webapi project;
2. Enter Install-Package Swashbuckle -version 6.0.0-beta902 in the nuget package manager console;
3. Configure the following in the Startup.cs file:
Fourth, in the properties of the webapi project, check the xml document file, as follows:
5. Change the launchUrl parameter value to swagger/ui in the Properties/launchSettings.json file of the webapi project, as shown below:
6. Generate the project, the webpage will automatically jump to the swagger ui interface, as shown below: