Following on from my adventures in Azure API Management Caching I discovered the following error when updating Azure API Management with a new OpenAPI definition file I received the following error: “Azure API Management Template Parameters Used In The UriTemplate Must Be Defined In The Operation, And Vice-Versa”. A fair bit of head-scratching ensued, due to the error message not giving too much away, (which Operation? I’ve 100s of them!) and also being a bit flippant (“vice-versa” <– sass!). Also, I always check that my OpenAPI document conforms and plays nicely with the online Swagger editor. So what gives?
I closely examined my last commit on the OpenAPI doc. I could see where I’d copied and pasted in new operations. I’d rather foolishly included “childId” as an input parameter for an operation that didn’t use or require it. My bad!. That said this is an easy/common bug to have. No developer would hand crank every Operation so it would be much better if we had some further assistance from Azure here.