In my previous blog post, I have illustrated how to setup OpenAPI/Swagger UI for Azure Function. In this blog, post let's see how to create Azure Function from OpenAPI specification. As part of recent updates from the Azure Functions team, there was an announcement for creating Azure Function by importing OpenAPI/Swagger definition.
Prerequisites
- Azure Function VS Code extension or command line
- autorest (Microsoft's OpenAPI specification generator) npm installed
npm install -g autorest
- Supported languages C#, Java, Python, TypeScript.
Steps to create function apps from Swagger definition
- Install or update VS code with Azure Function extension
- Navigate to Visual Studio Code à Azure Extension under which you should be able to see the option for creating Function App as shown in the below screenshot.
- Function App generated from the above OpenAPI definition shown below
References
More language support and details can be found here