Generate an API spec from a pipeline

Use SnapGPT to generate an OpenAPI 3.0 spec from a pipeline and download it as YAML or JSON.

With a pipeline open in Designer, SnapGPT can generate an OpenAPI 3.0 specification (spec). You download the YAML or JSON file and use it for generating a service for the spec in API Management 3.0. For more information, refer to API Management 3.0.

  1. In Designer, open the pipeline from which you want to generate an API.
  2. If the featured skill cards aren't visible in SnapGPT, click New chat to return to the home screen.
  3. Click Generate API spec.
    SnapGPT fills in the following prompt in the chat box: Generate an OpenAPI spec for this pipeline.
    SnapGPT skills list with Generate API spec selected and the prompt in the chat box

  4. Press Return or click SnapGPT Go icon.

    SnapGPT replies in the SnapGPT panel with the following:

    • A short message about how SnapGPT describes the pipeline.
    • A summary of the spec: the HTTP method, the path, and the response.
    • The next steps in API Management 3.0.
    • A Generated assets card with the spec file and a preview of its first lines.
      SnapGPT reply with the spec summary, the next steps, and the Generated assets card

    Review the file before you use it in API Management 3.0.

  5. Click the View all lines link to review the entire spec.
  6. Click Download and select YAML or JSON.
    Your browser downloads the file, which SnapGPT names after the pipeline, for example CSV_to_JSON_Conversion_Pipeline_openapi.yaml.
    Download menu on the Generated assets card with the YAML and JSON options