Skip to content

Commit 04273f6

Browse files
Alex KlausMarkPieszak
authored andcommitted
Fixed error 500 on requesting swagger.json (TrilonIO#312)
This fixes TrilonIO#310. Error 500 was occurring on requesting swagger.json (http://localhost:5000/swagger/v1/swagger.json) under the following conditions: - Pulled the project "as is" from GitHub - The environment is set to Development (as per this post) - Launch the project (F5) - Swagger UI gets loaded (http://localhost:5000/swagger/) See Swagger's requirements on method attributes in the comment here - domaindrivendev/Swashbuckle.AspNetCore#69 (comment) Closes TrilonIO#310
1 parent 7756b80 commit 04273f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Server/Controllers/HomeController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace AspCoreServer.Controllers
1414
{
1515
public class HomeController : Controller
1616
{
17+
[HttpGet]
1718
public async Task<IActionResult> Index()
1819
{
1920
var nodeServices = Request.HttpContext.RequestServices.GetRequiredService<INodeServices>();
@@ -55,6 +56,7 @@ public async Task<IActionResult> Index()
5556
return View();
5657
}
5758

59+
[HttpGet]
5860
[Route("sitemap.xml")]
5961
public async Task<IActionResult> SitemapXml()
6062
{

0 commit comments

Comments
 (0)