Generate functions from an OpenAPI Specification

This example pipeline demonstrates how to convert an OpenAPI specification into callable tool calling.

  1. Configure the OpenAPI Function Generator Snap with the following:
    1. Input type as URL to fetch the OpenAPI specification from an external source.
    2. OpenAPI Specification URL as https://petstore3.swagger.io/api/v3/openapi.json for accessing the OpenAPI document.
    3. Base URL as https://petstore3.swagger.io/api/v3 to define the API’s root endpoint.
    4. 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

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.
To successfully reuse pipelines:
  1. Download and import the pipeline in to the SnapLogic Platform.
  2. Configure Snap accounts, as applicable.
  3. Provide pipeline parameters, as applicable.