swaggeraspnetboilerplatenswagswashbuckle.aspnetcoreaspnetzero

nswag error in .NET 5.0, Process is terminating due to StackOverflowException


I am using aspnetzero framework. After upgrading .Net core to .Net5, I am facing an issue when running refresh.bat. It's throwing below mentioned error

Executing file '..\EMA.Web.Host\nswag\service.config.nswag' with variables 'Process is terminating due to StackOverflowException. child_process.js:656 throw err;'

Error: Command failed: dotnet "E:....\node_modules\nswag\bin/binaries/NetCore21/dotnet-> nswag.dll"

nswag version updated to 13.12.1.

When I run 'http://localhost:5000/swagger/v1/swagger.json', I am getting updated json.

Not sure why its causing Stack overflow exception, any pointers to resolve this issue?

Thanks.


Solution

  • Type JObject and JToken were causing this stackoverflow exception, removing them fixed the error.