stephaneey / azure-apim-extension

Full Azure API Management suite and more VSTS extension
MIT License
66 stars 48 forks source link

Import Policy from file #87

Open jlzrc opened 4 years ago

jlzrc commented 4 years ago

Create/Update API have the possibility to load the swagger from a file (build artifact) providing the local path of the file: $(System.DefaultWorkingDirectory)/

It would be possible to do a similar approach for Policies? The idea we have is to store in a repository both the swagger and the policies and load from there so everything could be versioned.

stephaneey commented 4 years ago

Hello,

Yes indeed, you're not the first one to ask. I'll put that on my radar.

HBCO commented 4 years ago

A tip, I had the same 'challenge' and solved it by using this component : https://marketplace.visualstudio.com/items?itemName=maikvandergaag.maikvandergaag-file-to-variable

joeyeng commented 4 years ago

So would the task allow you to map the policy xml files to each operation (by operationId)? That would be nice.

joeyeng commented 4 years ago

Oh, I see there's already a task for this (stephane-eyskens.apim.apimoperationpolicies.apimoperationpolicies@4), but it's just missing an option to set from a file.