Skip to content

Commit

Permalink
feat: redirect route / to swagger documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromsantos committed Oct 15, 2024
1 parent e306bcd commit ee7eb2f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 20_Katacombs/Katacombs/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ namespace Katacombs.Controllers;
/// </summary>
public class HomeController : ControllerBase
{
/// <summary>
/// Redirect root requests to Swagger API documentation.
/// </summary>
/// <returns>Redirect to Swagger API documentation.</returns>
[ApiExplorerSettings(IgnoreApi = true)]
[HttpGet("/")]
public IActionResult Home()
{
return RedirectPermanent("/swagger/index.html");
}

/// <summary>
/// Swagger API documentation.
/// </summary>
Expand Down

0 comments on commit ee7eb2f

Please sign in to comment.