OpenAPI specification code generation now available in Fabric User Data Functions

The Open API specification, formerly Swagger Specification, is a widely used, language-agnostic description format for REST APIs. This allows humans and computers alike to discover and understand the capabilities of a service in a standardized format. This is critical for creating integrations with external systems, AI agents and code generators.
Now, you can automatically generate the Open API specification of your Fabric User Data Functions by using the Generate invocation code feature of the Functions portal. This feature, in combination with making your functions publicly accessible, can enable the following use cases:
- Generate client code: Your functions can be invoked using a REST API call from outside of Fabric. Certain tools such as Swagger Codegen can use your OpenAPI specifications to automatically generate a client application to call the endpoints defined in your function.
- Integrate with API gateways and management: You can import your Open API specification into API management platforms, such as Azure API Management, allowing you to use it for your public Fabric User Data Functions.
- Integrate with AI agents: You can use an AI platform such as Azure AI Foundry to configure a tool that a model can use, unlocking many agentic use cases.
How to generate an OpenAPI specification?
IMPORTANT NOTE: To use this feature, you need to have the most up-to-date version of the fabric-user-data-functions library. You can find more information on how to update this library.
To generate your OpenAPI specification, simply navigate to your User Data Functions item in the Fabric portal and click on Generate invocation code on the toolbar of your functions. After that, you can select Open API specification from the drop-down menu. A new window will pop up where you can copy your specification. You can choose between JSON and YAML on the top bar.

Make sure your Python functions contain a DOCSTRING to describe their functionality and add the use case context they need. This will be included in the documentation for your OpenAPI specification.
How do I update my Fabric User Data Functions library?
To update this library, go to the Functions portal of your User Data Functions item and use the following steps:
- Select Library Management from the Functions portal page.
- Locate the
fabric-user-data-functionslibrary in the table, hover over it and select the edit icon. - Select the latest version from the dropdown. Hint: it’s listed at the top. There’s no need to publish your functions after updating your library. It’s always a good idea to keep this library up to date.

Resources
Feel free to email FabricUserDataFunctionsPreview@service.microsoft.com if you have any more questions.
For additional information about the new features and Fabric User Data Functions, refer to the following documentation.
- Read the documentation for the Generate Open API spec feature.
- Read the documentation of Develop mode in the Microsoft Fabric docs.
- Learn more about Fabric User Data Functions in the Microsoft Fabric docs.