I'm trying to setup an endpoint on Azure API Management with url parameters that routes to an Azure function.
EG: GET my-api-gateway.azure-api.net.com/product/{productId}
My inbound policies just set the backend and move the template param to a query param.
<inbound>
<base />
<set-query-parameter name="productId" exists-action="override">
<value>@(context.Request.MatchedParameters["productId"])</value>
</set-query-parameter>
<set-backend-service id="apim-generated-policy" backend-id="product-function" />
</inbound>
However, when I call my-api-gateway.azure-api.net.com/product/123, the /123 also gets passed to the backend function url
https://my-function.azurewebsites.net/api/product-function/123?productId=123
which results in a 404.
Is there someway to make this work?