Deployed C# AWS Serverless Application ASP.NET Core WebAPI using Terraform. The project is created using Visual Studio 2019 C# AWS Serverless Application template.The application is integrated with NSwag Swagger package.
I tried to open Swagger UI interface of my WebAPI application, I am getting "Failed to load API definition. Fetch error undefined /Stage/swagger/v1/swagger.json" error. APIs works fine.
Terraform code is based upon https://registry.terraform.io/providers/hashicorp/aws/2.34.0/docs/guides/serverless-with-aws-lambda-and-api-gateway
When I deployed the same application from Visual Studio 2019 by clicking "Publish to AWS Lambda", it works fine. Swagger UI interface of my application opens and APIs also work fine.
Do I need to do anything extra settings to enable swagger UI when deployed using Terraform.