Swagger Integration

Applies to ReadyAPI 3.5, last modified on December 29, 2020

ReadyAPI provides extensive support for Swagger/OpenAPI definitions. Create new ReadyAPI projects using your existing Swagger/OpenAPI definition, import definitions from and export them to SwaggerHub, and so on.

SwaggerHub support

ReadyAPI supports the following SwaggerHub versions:

  • SwaggerHub SaaS

  • SwaggerHub On-Premise 1.23.0-43 or later

Prerequisites

Manage your SwaggerHub account

You can add your SwaggerHub account to ReadyAPI and use it in any projects for SwaggerHub-related actions such as importing a definition.

To open the account manager, switch to the Integrations tab and select SwaggerHub > Manager in the Manage Installed Integrations section:

SwaggerHub account manager

Click the image to enlarge it.

If you haven't set up a SwaggerHub account in ReadyAPI yet, the account manager will have the Log in to SwaggerHub button. Click the button and set up your connection:

Log in to SwaggerHub
  1. If you use SwaggerHub On-Premise, select Use on-prem URL and enter the URL of your SwaggerHub instance.

  2. In the Username field, enter your SwaggerHub username.

    Note: The SwaggerHub integration does not support logging in with a GitHub account.
  3. In the API Key field, enter your API key.

    Tip: If you click Get API Key, you will be taken to the SwaggerHub API Keys page in your web browser. You can copy your API key from there.
Note: You can only add one SwaggerHub account to ReadyAPI.

If you already have a SwaggerHub account added to ReadyAPI, but you want to edit it, select Edit Account:

Edit SwaggerHub account

Click the image to enlarge it.

To test if your account can connect to the server, select Test Connection.

Create new projects

ReadyAPI creates REST projects based on existing OpenAPI or Swagger definitions. To enable it to do that, obtain a .yaml or .json file of a definition on your machine, or supply the URL of the tested service’s definition.

To learn how to create Swagger and OpenAPI projects, see Creating Project From OpenAPI/Swagger Definition.

Import Swagger definitions

Expand your existing projects by adding Swagger definitions to them. ReadyAPI supports importing definitions from SwaggerHub (both the SwaggerHub SaaS and SwaggerHub On-Premise) for public and private definitions – see Import from SwaggerHub for more information.

Export Swagger definitions

Use ReadyAPI to export any REST services in the OpenAPI/Swagger format (as a .json, .yaml, or .xml file), or to immediately publish them on SwaggerHub. See Exporting APIs for more information.

Validate Swagger service responses

To ensure your service sends responses that meet the Swagger specification requirements, use the Swagger Compliance assertion in your functional tests.

See Also

Integrations Tab
Plugin Manager

Highlight search results