Generate functions from an OpenAPI Specification
This example pipeline demonstrates how to convert an OpenAPI specification into callable tool calling.
- Configure the OpenAPI Function Generator Snap with
the following:
- Input type as URL to fetch the OpenAPI specification from an external source.
- OpenAPI Specification URL as https://petstore3.swagger.io/api/v3/openapi.json for accessing the OpenAPI document.
- Base URL as https://petstore3.swagger.io/api/v3 to define the API’s root endpoint.
- Preferred content type as application/json for specifying the expected data format.
On validation, the Snap processes the OpenAPI specification and generates an output with API functions, including metadata such as method type, endpoint URL, security settings, and headers.
OpenAPI Function Generator Snap configuration | OpenAPI Function Generator Snap output |
---|---|
![]() |
![]() |
Note: After generating the function definitions you can further utilize any Tool Calling Snap such
as, OpenAI Tool Calling, Amazon Bedrock Converse API Tool Calling, and Azure OpenAI Tool Calling to generate tool-based function
calls for retrieving external data, automating workflows, integrating with APIs, or
enhancing AI-driven applications.
- Download and import the pipeline in to the SnapLogic Platform.
- Configure Snap accounts, as applicable.
- Provide pipeline parameters, as applicable.