Generate the OpenAPI definition for Azure Function Apps

By | June 8, 2018

Generate the OpenAPI definition for Azure Function Apps - Featured Apps

We can generate the OpenAPI definition for Azure Function Apps easily from the Azure Portal. Once the OpenAPI definition generated, we can use it further for any other level of integration. We can integrate it with Power Apps, Microsoft Flows also even to distribute the services to external developers using Azure API Management services. API Definition setting for Azure Function Apps helps in to configure the Swagger metadata that describes our API and makes them easier for discovering and consume.

If you are new to Azure Functions, you may first read these articles:

Generate the OpenAPI Definition for Azure Function Apps

Generating the OpenAPI specification for Azure Function Apps are two steps process. First, select the methods for definition generation and secondly, generate the API definition.

From the Azure Portal, navigate to the respective Function App, and select Integrate Option. In this section choose all the methods and header types for which you want to perform the integration and generate the API Specification.

Generate the OpenAPI Specification for Azure Function Apps - Select HTTP Methods

In the next step, Move to the platform feature tab under Function Apps Settings, and choose API definition available under API Group.

Generate the OpenAPI Specification for Azure Function Apps - API Definition

It will bring the API definition generation screen. Click on the “Generate API definition template” to generate the Swagger files for your Azure Function.  This will also produce the API definition URL.

Generate the OpenAPI Specification for Azure Function Apps - Generate API Definition Template

Save the definition. That’s it.

 

You have the OpenAPI Specification for Azure Function. Access the Open API URL to see the swagger definition.

Generate the OpenAPI Specification for Azure Function Apps - Quick References

You can now also further test this API through tools like Postman or any other REST Client Tools.

Author: Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

Leave a Reply