Swashbuckle.WebApi icon indicating copy to clipboard operation
Swashbuckle.WebApi copied to clipboard

Swagger UI not generating in azure .net core

Open akhilkr40 opened this issue 5 years ago • 3 comments

Swagger UI is not creating in a .net core application when deployed in azure but it is working perfectly in local

I have added this in

ConfigureServices(IServiceCollection services) methode in startup.cs

services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Version = "v1", Title = "API", Description = "API" }); });

and

app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "API"); c.RoutePrefix = "swagger"; });

in Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)

akhilkr40 avatar Aug 26 '19 10:08 akhilkr40

I have the same issue, we have a project deploying to Azure Web App, the /swagger/index.html produces 'Not Found', any thoughts?

timthedevguy avatar Oct 21 '19 13:10 timthedevguy

I have the same issue. Any workaround?

chandra-rayaprol avatar Dec 08 '20 00:12 chandra-rayaprol

I had a similar problem. It turned out that the code was only in the development environment

image

Arimov avatar Jun 02 '21 10:06 Arimov