Adding a Swagger definition as a synchronization source

Use a Swagger definition to automatically create the resources that are required for testing the API that the definition describes.

About this task

Resources that are generated from a Swagger definition can include operations and WebForm, JSON, and URL schemas.
Security information about basic-authentication and API-keys in Swagger definitions are included when you synchronize.
Basic Authentication
An HTTP transport is created with Basic Authentication enabled.
API key
After you synchronize with the Swagger definition that defines at least one API key, an environment tag is created for each API key security scheme. Each created tag's usage depends on the security scheme in property header or query.
  • A header field is created in the associated operation with the environment tag as the fields default value.
  • A query segment is created in the produced rest schema with the environment tag as the default value.
OAuth2
Not supported.

Procedure

  1. Launch the Create a new Synchronization Source wizard in one of the following ways:
    • On the toolbar of the Synchronization view of the Architecture School perspective , click Web > Swagger Definition.
    • Click the Create Synchronization Source icon () and select Swagger Definition from the Type list.
    • Paste a URL that points to a Swagger definition into the workspace for the Logical view.
    The Create a new Synchronization Source wizard is displayed. Go to step 2.
  2. Complete the information on the first page of the Create a new Synchronization Source wizard that is unique to the Swagger source.
    The first page of the wizard
    That information consists of the location for the definition file to use as a sync source:
    File
    Click Browse to navigate to a Swagger definition file on your local network.
    URL
    Enter a URL in the associated text box that points to a Swagger definition file.

    The Swagger definition can be in either JSON or YAML format.

  3. Complete the wizard by following the instructions in Adding a synchronization source.

Feedback