Swagger failed to load api definition in Asp.Net Core Web Api

When We Create an API in C# .Net Core we mostly see failed to load API definition error because we don’t configure the project and miss out on something that affects the program.

This is due to we have not configured the swagger and API route perfectly.

Here Is the Simple Step to Solve the Fetch error response status is 500 https://localhost:44326/swagger/v1/swagger.json

  • open your project
  • go Controller=> and Search for Route
  • Simple write action in route as shown below.
Swagger Failed to load Api Definition

Here is the video to Solve this error.


Leave a Comment