Sometimes we forget to checkmark the use Controllers when creating ASP.NET Core Web API in the beginning so the screen will show "No operations define in spec !" like the screen below.
What should we do ?
Don't worry, in the program.cs you can add the code :
builder.Services.AddControllers();
app.MapControllers();