azure-apim-extension icon indicating copy to clipboard operation
azure-apim-extension copied to clipboard

Import Policy from file

Open jlzrc opened this issue 4 years ago • 4 comments

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

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.

jlzrc avatar May 22 '20 08:05 jlzrc

Hello,

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

stephaneey avatar May 24 '20 07:05 stephaneey

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

HBCO avatar May 25 '20 06:05 HBCO

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

joeyeng avatar Jun 12 '20 17:06 joeyeng

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.

joeyeng avatar Jun 12 '20 19:06 joeyeng