Automate bundle creation using openAPISpec + add necessary policies + push it to edge - cicd using Azure Devops

Hi, I'm looking for the suggestions on the below usecase I'm thinking of building -

We have a template- its a bundle with all the common policies attached to the proxy endpoint. When we onboard a new API proxy, with the approved OAS - we make initial updated to the template (ex- flow updates, target servers updates) and then push to edge using Azure devops pipelines - with Apigee-Maven plugins.

We want to avoid the manual process of updating now, and I'm looking for

1. I want to setup a trigger, which looks up for a OAS in a specific repo. once there is a OAS - It should create a bundle.

2. Proxy endpoints and the target endpoints in the bundle has to be updated with the common policies in the template we are using.

3. Then CICD should push the updated package to the edge.

This may look little complicated, any help/ suggestion is much appreciated. @Sai Saran Vaidyanathan. @Anil Sagar @ Google.

0 1 374
1 REPLY 1

There is no OOTB solution available for your requirement.
You may do the following:
1. You can use the openapi2apigee node module or java based swagger utility to generate the API proxy bundle. You may need to tweak these utilities a bit, to accept commandline arguments and avoid console inputs. You can then invoke these utilities from your CI pipeline.
OR you can choose to Write your own custom code in your preferred language to parse the OAS and generate an API proxy bundle.
2. Add another step in the CI pipeline to use scripts to update the appropriate XMLs in the proxy bundle generated above, to add policies etc from your pre-defined template
Publish your CI artifact
3. Create your CD to trigger for CI changes and deploy the published artifact to edge