Min Web API tutorial rewrite plus app samples updates v10#37294
Conversation
mikekistler
left a comment
There was a problem hiding this comment.
Looks good. 👍
I left a few nit-picky comments, but one bigger concern is using NSwag. I think I'd prefer that we use either SwagggerUI from Swashbuckle or Scalar, since those are the ones we describe elsewhere in the docs.
|
OK thanks! It was using Swagger UI, but you are right, it was coming from the Nswag package. I will change it. |
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
|
@mikekistler, finally done. It is using Scalar for the VSC version now instead. If the code and tutorial look OK, then I will put a copy of this code on the samples repo and pont to it at the top indicating where the finished sample is and that it is Codespaces supported. |
|
@tdykstra, for an additonal review request. |
|
@tdykstra, for an additonal review request. |
tdykstra
left a comment
There was a problem hiding this comment.
Great work! I left a couple suggestions for very minor matters.
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Fixes #37302
Rewrites the Minimal Web API tutorial to:
Change the starting point from an empty project to the OpenAPI-enabled Web API template where most developers would start. Visual Studio now uses the ASP.NET Core Web API project type (with "Enable OpenAPI support" checked and "Use controllers" unchecked); the CLI switches from dotnet new web to dotnet new webapi.
Replace the old Swagger/NSwag testing approach with the built-in OpenAPI document generator (AddOpenApi() / MapOpenApi()), and uses Scalar (Scalar.AspNetCore) as the browser UI for VS Code instead of NSwag's Swagger UI. Visual Studio continues to use Endpoints Explorer + .http files.
Update all 8 app samples used by this tutorial for .NET 10 using the ASP.NET Core Web API (webapi for CLI) template.
After this PR is completed/merged:
Update in a new PR refer to final complete app version VS (using .http testing files) and VS Code (using Swagger UI)version on the AspNetCore.docs.samples repo which can be run in Codespaces.
Internal previews