How to integrate OpenAPI into Azure API Management using Azure DevOps CI & CD pipeline

1.9k Views Asked by At

I have created an Azure API Management instance. I want to integrate OpenAPI into Azure API Management using Azure DevOps CI & CD pipelines.

For each release, I want to generate the OpenAPI spec from the code automatically. How can I build on this OpenApi spec to set up Azure API Management with all required version sets, apis, products, tags, users, subscriptions, certificates, and policies?

2

There are 2 best solutions below

2
SaiSakethGuduru On

Here is the Sample Document where you can Automate Open API to APIM using CI/CD pipelines

https://www.domstamand.com/automating-your-openapi-updates-to-api-management-through-your-cicd-pipeline/

we need to use the Swashbuckle CLI which can be use to retrieve the Swagger/OpenAPI JSON directly from the application’s startup assembly, and write it to a file. Follow the configuration to add the CLI to your source control repository so you can restore the tool and use it in your CI build definition.

0
Huugoo On

Indeed you can use the Swashbuckle CLI to generate the OpenApi spec file.

You can use this devops extension to easily configure your API Management API's through your CICD pipeline: https://marketplace.visualstudio.com/items?itemName=stephane-eyskens.apim