Isolated Http Trigger [FromQuery] bool parameterName cannot serialize Pascal case True or False #2786
Labels
area: http
Items related to experience improvements for HTTP triggers
enhancement
New feature or request
Repro steps
http://localhost:7107/api/Function1?includeSomething=False
Expected behavior
Expected response body:
Did you include something? False
Actual behavior
Http Error - 500 Internal Server Error occurs
Function app console logs are as follows:
Known workarounds
The obvious workaround is the use lowercase first letter true or false e.g.
http://localhost:7107/api/Function1?includeSomething=false
This will work.
To support pascal case we can use a string input parameter and parse it:
Related information
The issue is the same whether you run the application locally or deployed in azure.
Can be replicated on a default .net isolated azure function app
Program.cs:
host.json:
local.settings.json:
Azure Logic Apps that use the Http Swagger action or the API Management action will automatically provide a "False" or "True" to query parameters coded as boolean, so I have to support both camel and pascal case when migrating to the isolated worker.
This is mostly just frustrating but there are simple ways to work around it.
The text was updated successfully, but these errors were encountered: