Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

swagger error for my upgraded .netcore app

So I do have this web api built in .netcore 2.2 when Im on the process of upgrading this error shows up

System.InvalidOperationException: 'API Explorer not registered in DI.'

I already upgraded my swagger nugget and follow some instructions in upgrading but this error still pops up.

Click for the image of the error

like image 836
Neljohn Dela Cruz Avatar asked Sep 17 '25 14:09

Neljohn Dela Cruz


1 Answers

Add services.AddMvcCore().AddApiExplorer();

in public void ConfigureServices(IServiceCollection services)

like image 191
Ali Rida Avatar answered Sep 19 '25 07:09

Ali Rida