azure-functions-openapi-extension
azure-functions-openapi-extension copied to clipboard
Using JsonSerializerSettings with JsonResult Causes Error
After installing this package, all my functions that had JsonSerializerSettings in the return failed and the method can't be found.
return new JsonResult(info, new JsonSerializerSettings { Formatting = Formatting.Indented });
This causes the following error after running this GET method
System.Private.CoreLib: Exception while executing function: MyFunction. My.Functions: Method not found: 'Void Microsoft.AspNetCore.Mvc.JsonResult..ctor(System.Object, Newtonsoft.Json.JsonSerializerSettings)
If I remove the JsonSerializerSettings from the return method then the method works fine. This was working before installing the package so not sure if it is directly this package causing the issue or a dependency.
This is using an InProc Version 4 Azure Function using .NET 6 with the latest libraries.