Enable Swagger/OpenAPI in production
This commit is contained in:
parent
0da275e039
commit
180ad4039e
1 changed files with 7 additions and 6 deletions
|
@ -48,14 +48,15 @@ namespace Server {
|
||||||
|
|
||||||
if (env.IsDevelopment()) {
|
if (env.IsDevelopment()) {
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI(c => {
|
|
||||||
c.SwaggerEndpoint("/swagger/v3/swagger.json", "InfoTren Scraper v3");
|
|
||||||
c.SwaggerEndpoint("/swagger/v2/swagger.json", "InfoTren Scraper v2");
|
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "InfoTren Scraper v1");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UseSwagger();
|
||||||
|
app.UseSwaggerUI(c => {
|
||||||
|
c.SwaggerEndpoint("/swagger/v3/swagger.json", "InfoTren Scraper v3");
|
||||||
|
c.SwaggerEndpoint("/swagger/v2/swagger.json", "InfoTren Scraper v2");
|
||||||
|
c.SwaggerEndpoint("/swagger/v1/swagger.json", "InfoTren Scraper v1");
|
||||||
|
});
|
||||||
|
|
||||||
// app.UseHttpsRedirection();
|
// app.UseHttpsRedirection();
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
Loading…
Add table
Reference in a new issue