Skip to content

Generate a connector

Generate a connector from an OpenAPI definition

This document explains how to generate a connector from an OpenAPI definition using Micro Integrator for VSCode Extension. By using an OpenAPI definition, users can automatically create a connector that enables seamless integration with RESTful APIs. The connector will be added to your project and you can use it in your integration flows. When you share your Integration Project with others, the connector will be included in the project.

Follow the below steps to generate a connector using the WSO2 Micro Integrator for VS Code extension (MI for VS Code).

  1. Launch Visual Studio Code with the MI for VS Code extension installed.

    Info

    Follow the Install Micro Integrator for VS Code documentation for a complete installation guide.

  2. Create a new integration project.

    Click Create New Project on Micro Integrator Project Explorer. For more options to create a new integration project, see Create an Integration Project.

  3. Navigate to the Project Overview page.

  4. Click on Add artifact.

    add artifact

  5. Click + View More under Create an Integration.

  6. Select Connections under Other Artifacts to open the Connector Store form.

    connections artifact

  7. Click Import Connector.

    import connector

  8. Select Import Using OpenAPI method and click on Select Location to upload the OpenAPI definition file. After uploading the file, click Import.

    Tip

    You can download a sample OpenAPI definition file from here.

    import connector form

  9. If the OpenAPI definition is valid, the connector will be generated and added to the project. You can view the generated connection type in the Connections.

    generated connector

  10. To use the connector operations, you can create an integration artifact (such as API and sequence) and add it from the Mediator Palette.

    use connector