From 2e19966947602616051e91126ab238c0d976ca7a Mon Sep 17 00:00:00 2001 From: Rico Suter Date: Fri, 21 Sep 2018 19:16:54 +0200 Subject: [PATCH] Fix snippets in NSwag tutorial (#8656) Fixes the used snippets in the NSwag tutorial (currently the imports are missing and the configure snippet is used twice). --- aspnetcore/tutorials/getting-started-with-NSwag.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/tutorials/getting-started-with-NSwag.md b/aspnetcore/tutorials/getting-started-with-NSwag.md index 24c5eeb978..d8d870a724 100644 --- a/aspnetcore/tutorials/getting-started-with-NSwag.md +++ b/aspnetcore/tutorials/getting-started-with-NSwag.md @@ -91,11 +91,11 @@ dotnet add TodoApi.csproj package NSwag.AspNetCore Import the following namespaces in the `Startup` class: -[!code-csharp[](../tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.NSwag/Startup.cs?name=snippet_ConfigureServices&highlight=8-8)] +[!code-csharp[](../tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.NSwag/Startup.cs?name=snippet_StartupConfigureImports)] In the `Startup.ConfigureServices` method, register the required Swagger services: -[!code-csharp[](../tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.NSwag/Startup.cs?name=snippet_Configure&highlight=6-10)] +[!code-csharp[](../tutorials/web-api-help-pages-using-swagger/samples/2.0/TodoApi.NSwag/Startup.cs?name=snippet_ConfigureServices&highlight=8)] In the `Startup.Configure` method, enable the middleware for serving the generated Swagger specification and the Swagger UI v3: