.net-coreasp.net-web-api.net-6.0

Migration of ASP.NET 4.6 Help Pages to .NET 6 (.net core)


In .NET framework we have support of Creating Help Page for Web API.

https://learn.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages

Does this feature supported in .NET 6. We are migrating our legacy ASP.NET framework application to .NET6.

How to migrate this feature to .NET6? If it is not supported in .Net6(.net core) how can we achieve the similar functionality in .Net core

I am trying to migrate this feature to .net core but I am facing issues on how to load the app data, register HelpdataConfig in .net core.


Solution

  • As you can see in ASP.NET help page for ASP.NET Core Web API, the Microsoft.AspNet.WebApi.HelpPage is for ASP.NET and does not for ASP.NET CORE or .NET 6, so you have to migrate this library to some popular Web API documentation libraries like Swagger

    As you can see in ASP.NET Core web API documentation with Swagger / OpenAPI, you can use below documentation

    By Christoph Nienaber and Rico Suter

    Swagger (OpenAPI) is a language-agnostic specification for describing REST APIs. It allows both computers and humans to understand the capabilities of a REST API without direct access to the source code. Its main goals are to:

    The two main OpenAPI implementations for .NET are Swashbuckle and NSwag, see: