I have been using APIM to expose storage account and service bus. I am validating these apis using policies. I have been just validating few request headers and query parameters but it is already too much code in policies.
Is this how the policies are big. Or is there a clean way to do this.
Update I have two api operations, one api attached to the storage account for uploading files. Other api attached to service bus topic. I have to validate the header properties in APIM.
I have 4 to 5 headers to validate for every api. Validation can be of required, enum validation and or custom validation with Custom message. Just to add validation it takes 50 lines are so. In addition to that I use event hub logging which is takes another 5 to 6 lines of code on inbound and error.
I am already starting to feel it is not bad to have connected api directly to storage account or service bus.