• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Swagger/OpenAPI static file not appearing

Resolved: Swagger/OpenAPI static file not appearing

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

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:
I’m running/building the app through visual studio 2022 as well as dotnet run

Answer:

Change your .csproj file like below. And please the result.
enter image description here

If you have better answer, please add a comment about this, thank you!

asp.net-core c# swagger
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: net::ERR_HTTP2_PROTOCOL_ERROR by http get request angular 15.2

02/04/2023

Resolved: How do I stop the command from happening if the requirements for it to work aren’t sert Discord.js

02/04/2023

Resolved: How to scroll bottom of div at launch?

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.