OpenAPI Specification Generation in Fabric User Data Functions
Microsoft Fabric Blog details how developers can use the Functions portal to automatically generate OpenAPI specifications for User Data Functions, supporting API integrations, client code generation, and AI agent capabilities.
OpenAPI Specification Generation in Fabric User Data Functions
Microsoft Fabric has introduced the ability to automatically generate OpenAPI specifications (formerly Swagger Specification) for User Data Functions directly in the Functions portal. OpenAPI is a language-agnostic standard for describing REST APIs, enabling both human and machine users to understand service capabilities, which is critical for integration, code generation, and AI scenarios.
Key Use Cases
- Client Code Generation
- Generate REST API client code for your Fabric functions using tools like Swagger Codegen.
- Automate invocation from external applications based on OpenAPI specs.
- API Gateway and Management Integration
- Import OpenAPI specs into API management platforms such as Azure API Management.
- Facilitate public exposure and management of User Data Functions endpoints.
- Integration with AI Agents
- Use platforms like Azure AI Foundry to configure tools and models that interact with your APIs.
- Unlock agentic AI scenarios by giving models structured access to function endpoints.
How to Generate OpenAPI Specifications
- Ensure your project uses the latest
fabric-user-data-functions
library version. Update it via the Functions portal. - Navigate to your User Data Functions item.
- Click Generate invocation code in the toolbar.
- Select Open API specification from the dropdown.
- Choose JSON or YAML format in the popup and copy your specification.
Python Docstrings for Documentation
Provide meaningful docstrings in your Python functions to automatically include descriptive metadata in the generated OpenAPI spec.
Updating the Library
- Go to the Functions portal’s Library Management section.
- Find and edit the
fabric-user-data-functions
library. - Select the latest version from the dropdown; publishing your functions is not required after the update.
- Keeping the library up to date is important for compatibility with new portal features.
Resources
- For questions, email FabricUserDataFunctionsPreview@service.microsoft.com.
- Develop mode in the Microsoft Fabric docs
- Fabric User Data Functions overview
Images and walkthroughs illustrating the process are available in the original post.
This post appeared first on “Microsoft Fabric Blog”. Read the entire article here