File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff 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
152130Press Ctrl+F5 to run without the debugger.
You can’t perform that action at this time.
0 commit comments