You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preceding `UseSwaggerUI` method call enables the [Static File Middleware](xref:fundamentals/static-files). If targeting .NET Framework or .NET Core 1.x, add the [Microsoft.AspNetCore.StaticFiles](https://www.nuget.org/packages/Microsoft.AspNetCore.StaticFiles/) NuGet package to the project.
97
113
98
114
Launch the app, and navigate to `http://localhost:<port>/swagger/v1/swagger.json`. The generated document describing the endpoints appears as shown in [Swagger specification (swagger.json)](xref:tutorials/web-api-help-pages-using-swagger#swagger-specification-swaggerjson).
@@ -110,8 +126,13 @@ If using directories with IIS or a reverse proxy, set the Swagger endpoint to a
110
126
111
127
Swagger provides options for documenting the object model and customizing the UI to match your theme.
112
128
113
-
In the Startup class, add the following namespaces:
In the `Startup` class, add the following namespaces:
130
+
131
+
```csharp
132
+
usingSystem;
133
+
usingSystem.Reflection;
134
+
usingSystem.IO;
135
+
```
115
136
116
137
### API info and description
117
138
@@ -239,7 +260,13 @@ namespace TodoApi
239
260
240
261
Configure Swagger to use the XML file that's generated with the preceding instructions. For Linux or non-Windows operating systems, file names and paths can be case-sensitive. For example, a *TodoApi.XML* file is valid on Windows but not CentOS.
The Swagger UI now clearly documents the expected HTTP response codes:
390
435
391
436

@@ -410,7 +455,17 @@ The preceding NuGet package is already installed if targeting .NET Core 2.x and
Acquire the contents of the *dist* folder from the [Swagger UI GitHub repository](https://github.com/swagger-api/swagger-ui/tree/master/dist). This folder contains the necessary assets for the Swagger UI page.
0 commit comments