I try to use Swagger with Microsoft WebAPI 2.
For the moment, I\'ve the following call in a method.
appBuilder
.ConfigureOAuth()
.UseWebApi(con
Following the example from here:
https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-2.2&tabs=visual-studio
public class Startup {
public void Configure(IApplicationBuilder app) {
...
app.UseSwaggerUI( c => {
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
c.RoutePrefix = string.Empty;
});
app.UseMvc(); // <-- must be after
}
}
I couldn't get it to work until I placed the app.UseMvc() after the call to app.UseSwaggerUI().