Apidog · Arazzo Workflow

Apidog Convert Postman Collection To OpenAPI

Version 1.0.0

Import a Postman Collection into Apidog and export it back out as OpenAPI.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI CodingAPI DesignAPI LifecycleAPI TestingCollaborationDesign-FirstDocumentationMCPMockingPlatformArazzoWorkflows

Provider

apidog

Workflows

convert-postman-to-openapi
Convert a Postman Collection into an OpenAPI document via an Apidog project.
Imports a stringified Postman Collection into the project, then exports the project as an OpenAPI document in the requested version and format.
2 steps inputs: accessToken, apiVersion, oasVersion, postmanCollection, projectId outputs: endpointsCreated, openapiDocument
1
importPostman
importPostmanCollectionData
Import the supplied Postman Collection into the staging project, creating new endpoints as needed.
2
exportAsOpenApi
exportOpenApiData
Export the now-populated project as an OpenAPI document in the requested version, delivered as JSON.

Source API Descriptions

Arazzo Workflow Specification

apidog-convert-postman-to-openapi-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Apidog Convert Postman Collection To OpenAPI
  summary: Import a Postman Collection into Apidog and export it back out as OpenAPI.
  description: >-
    Uses Apidog as a conversion engine: a Postman Collection v2 document is
    imported into a staging project, and the project is then exported as a
    fully-formed OpenAPI document. The result is an OpenAPI specification
    derived from a Postman Collection. Each step spells out its request inline —
    including the required Apidog API version header and bearer authentication —
    so the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: apidogApi
  url: ../openapi/apidog-apidog-openapi.yml
  type: openapi
workflows:
- workflowId: convert-postman-to-openapi
  summary: Convert a Postman Collection into an OpenAPI document via an Apidog project.
  description: >-
    Imports a stringified Postman Collection into the project, then exports the
    project as an OpenAPI document in the requested version and format.
  inputs:
    type: object
    required:
    - accessToken
    - apiVersion
    - projectId
    - postmanCollection
    properties:
      accessToken:
        type: string
        description: Apidog personal API access token used as the Bearer Token.
      apiVersion:
        type: string
        description: The Apidog API version header value (e.g. 2024-03-28).
      projectId:
        type: integer
        description: The staging project ID to import into and export from.
      postmanCollection:
        type: string
        description: The Postman Collection v2 data as a stringified JSON string.
      oasVersion:
        type: string
        description: Target OpenAPI version for the export.
        enum:
        - '2.0'
        - '3.0'
        - '3.1'
        default: '3.0'
  steps:
  - stepId: importPostman
    description: >-
      Import the supplied Postman Collection into the staging project, creating
      new endpoints as needed.
    operationId: importPostmanCollectionData
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: X-Apidog-Api-Version
      in: header
      value: $inputs.apiVersion
    - name: projectId
      in: path
      value: $inputs.projectId
    requestBody:
      contentType: application/json
      payload:
        input: $inputs.postmanCollection
        options:
          endpointOverwriteBehavior: AUTO_MERGE
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      importSuccess: $response.body#/success
      endpointsCreated: $response.body#/data/endpoint/created
  - stepId: exportAsOpenApi
    description: >-
      Export the now-populated project as an OpenAPI document in the requested
      version, delivered as JSON.
    operationId: exportOpenApiData
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: X-Apidog-Api-Version
      in: header
      value: $inputs.apiVersion
    - name: projectId
      in: path
      value: $inputs.projectId
    requestBody:
      contentType: application/json
      payload:
        scope: ALL
        oasVersion: $inputs.oasVersion
        exportFormat: JSON
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      openapiDocument: $response.body#/data
  outputs:
    endpointsCreated: $steps.importPostman.outputs.endpointsCreated
    openapiDocument: $steps.exportAsOpenApi.outputs.openapiDocument