azure-functions-host: Preserve datatype constraints provided in HttpTrigger route
Route Constraints allow specifying datatypes for query string parameters on HttpTrigger route property. These constraints are only used to match the route. When using binding parameters datatype is converted to strings. For example:
{
"disabled": false,
"bindings": [{
"authLevel": "admin",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get"
],
"route": "InventoryPosition/{locationNumber:int}/{itemNumber:int}"
},
{
"name": "inventoryPositions",
"type": "documentdb",
"direction": "in",
"databaseName": "ihub",
"collectionName": "inventoryPosition",
"sqlQuery": "SELECT * FROM c WHERE c.locationNumber = udf.toInt({locationNumber}) AND c.itemNumber = udf.toInt({itemNumber})",
"connection": "DOCUMENTDB_CONNECTIONSTRING"
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}
locationNumber and itemNumber have int constraints but are converted to string when using then doccument db query string.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 4
- Comments: 16 (4 by maintainers)
Is there any update on this one? We still are experiencing this issue using .NET core 2.1 functions.
+1 ran into this issue as well.
This is still a problem.