We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3468695 commit 84b1b80Copy full SHA for 84b1b80
examples/AspNetCore/OData/SomeODataOpenApiExample/Program.cs
@@ -64,7 +64,9 @@
64
// Configure the HTTP request pipeline.
65
66
app.UseSwagger();
67
-app.UseSwaggerUI(
+if ( builder.Environment.IsDevelopment() )
68
+{
69
+ app.UseSwaggerUI(
70
options =>
71
{
72
var descriptions = app.DescribeApiVersions();
@@ -77,7 +79,7 @@
77
79
options.SwaggerEndpoint( url, name );
78
80
}
81
} );
-
82
+}
83
app.UseHttpsRedirection();
84
app.UseAuthorization();
85
app.MapControllers();
0 commit comments