Update README.md

Contributes to [this internal issue](https://github.com/dotnet/aspnetcore-internal/issues/4522#issuecomment-2078104865) and is required to be obvious in query results.
This commit is contained in:
Rick Anderson 2024-04-27 17:23:59 -10:00 committed by GitHub
parent a0ccfc84da
commit 6bc6c5a22d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,7 +113,7 @@ Use Swagger to ensure that you have a self-documenting API, where the docs chang
{ {
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => app.UseSwaggerUI(c => // UseSwaggerUI Protected by if (env.IsDevelopment())
{ {
c.SwaggerEndpoint("/swagger/v1/swagger.json", "PizzaStore API V1"); c.SwaggerEndpoint("/swagger/v1/swagger.json", "PizzaStore API V1");
}); });