Skip to main content

Transforming API Workspace Specification Format

You can easily transform the API specification format being used by your API workspace to a different format using our VS Code extension's Transform feature.

Transform

Pre-Requisites

  • You must be authorized with APIMatic using an Authentication Key to transform your API workspace. To obtain an authentication key please see relevant documentation here. When transforming, you will be prompted to provide the authentication key the first time:

    Authorization

    Only if the provided key is valid, will you be allowed to proceed with the transformation. You will not be prompted for the key again for as long as it is valid.

  • In order to transform your API workspace, it is required for your workspace to pass the Build first.

Transforming the API Workspace Format

To transform your API workspace specification format, click on the two-way arrow (<->) icon from the left side of the status bar:

Transform Spec

Select the desired output API specification format from the list e.g. OpenAPI v3.1:

Transform Spec Format

Next, select the destination folder where you would like to save the transformed output file:

Transformed Spec Folder

After selecting a folder, if your workspace isn't already built, the build process will start first:

Build Running

If the build passes, the transformation process will start next. During this, you should see a Transforming... message in the status bar:

Transform Running

When the transformation is complete, the converted output will be downloaded into your workspace root folder:

Transform Completed

Configuring the Transformation Process

Transformation can be easily configured using various available options. Since transformation is essentially import and export steps combined into one step, the VS Code extension allows you to easily add a Metadata file with default import and export settings as follows:

  • Hover near the Workspace File Navigator view title and click on the Add APIMatic Metadata Configuration File option:

    Add Metadata File

  • You will be asked to select all items you'd like to initialize in the APIMatic Metadata file. For the current example, we will only select Import and Export from the list:

    Import Export Configuration

  • After proceeding, an APIMatic Metadata file will be successfully added in your workspace with default import and export settings as shown below. You can play around with these settings to control the transformation process as per your needs:

    Import Export Configuration Added

For More Information

You can find out more details here about our API Transformer solution and its related information.