Question:
I’m trying make the dotnet 6 Weather API example generate the static swagger.json or swagger.yaml.I’m pretty sure i’ve followed the steps from Microsoft docs but no static files are being generated, i’m expected them to appear on build.
Microsoft docs url:
https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-6.0&tabs=visual-studio
The code in my
program.cs
:dotnet run
Answer:
Change your.csproj
file like below. And please the result.
If you have better answer, please add a comment about this, thank you!