projects/mvc/nswag-2/README.md
This sample demonstrates ASP.NET Core 10's built-in OpenAPI support with MVC controllers and tags.
[Tags("Category")] attribute[ApiExplorerSettings(IgnoreApi = true)]dotnet watch run
Navigate to http://localhost:5000/ to see the home page.
/scalar/openapi/v1.jsonGET /api/greeting - Returns "Hello World" messagePOST /api/greeting/goodbye - Returns goodbye message with namePUT /api/greeting - Relays a greetingDELETE /api/greeting/greetings/{name} - Removes a greetingPATCH /api/greeting - Updates greeting with cityThis sample was migrated from NSwag to .NET 10's built-in OpenAPI support.
Changes:
NSwag.AspNetCore and NSwag.Annotations package dependenciesMicrosoft.AspNetCore.OpenApi (built-in)Scalar.AspNetCore for modern UI[OpenApiTag("Basic")] with [Tags("Basic")][OpenApiIgnore] with [ApiExplorerSettings(IgnoreApi = true)]GenerateDocumentationFile in .csprojBenefits:
See OUT-OF-DATE.md for migration details.