Browse Source

Enable Swagger/OpenAPI in production

master
Kenneth Bruen 2 years ago
parent
commit
180ad4039e
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 3
      server/Startup.cs

3
server/Startup.cs

@ -48,13 +48,14 @@ namespace Server {
if (env.IsDevelopment()) { if (env.IsDevelopment()) {
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
}
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => { app.UseSwaggerUI(c => {
c.SwaggerEndpoint("/swagger/v3/swagger.json", "InfoTren Scraper v3"); c.SwaggerEndpoint("/swagger/v3/swagger.json", "InfoTren Scraper v3");
c.SwaggerEndpoint("/swagger/v2/swagger.json", "InfoTren Scraper v2"); c.SwaggerEndpoint("/swagger/v2/swagger.json", "InfoTren Scraper v2");
c.SwaggerEndpoint("/swagger/v1/swagger.json", "InfoTren Scraper v1"); c.SwaggerEndpoint("/swagger/v1/swagger.json", "InfoTren Scraper v1");
}); });
}
// app.UseHttpsRedirection(); // app.UseHttpsRedirection();

Loading…
Cancel
Save