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

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?



Solution 1:[1]

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.

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SaiSakethGuduru-MT
Solution 2 Huugoo