Skip to content

Commit 7259e72

Browse files
authored
Remove redundant code snippet from tutorial
A corrected code snippet is now pulled in above this from a full app sample.
1 parent 26ebc0b commit 7259e72

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

aspnetcore/tutorials/first-web-api.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -125,28 +125,6 @@ The previously highlighted code:
125125
* Sets the `SwaggerEndpoint()` option to the location of the OpenAPI documentation for this project.
126126
* Ensures the Swagger UI is only available in the app development environment to limit information disclosure and security vulnerability.
127127

128-
```csharp
129-
var app = builder.Build();
130-
131-
// Configure the HTTP request pipeline.
132-
if (app.Environment.IsDevelopment())
133-
{
134-
// Add SwaggerUI
135-
app.UseSwaggerUI(options =>
136-
// Add SwaggerEndpoint
137-
options.SwaggerEndpoint("/openapi/v1.json", "v1")
138-
);
139-
app.MapOpenApi();
140-
}
141-
142-
app.UseHttpsRedirection();
143-
144-
app.UseAuthorization();
145-
146-
app.MapControllers();
147-
148-
app.Run();
149-
```
150128
# [Visual Studio](#tab/visual-studio)
151129

152130
Press Ctrl+F5 to run without the debugger.

0 commit comments

Comments
 (0)