Adding an OpenAPI 3.0 definition as a synchronization source
You can add an OpenAPI 3.0 definition to automatically create the resources that are required for testing the API that the definition describes.
About this task
- Basic Authentication
- An operation that uses this security scheme results in a physical HTTP transport configured with the Basic Authentication type enabled.
- Bearer
- An operation that uses this security scheme results in an authorization header with a default value of bearer <tag> where tag is an environment tag with a name <syncSourceName>/<securitySchemeName>/<parameterName(in this case Authorization)>.
- API key
- An API key is used for authorization and can be sent in a header, query or cookie.
- Header: An HTTP header is placed in the operation. The name is whatever the API definition defined it as. Its value is a tag that uses the same format as the bearer tag.
- Query: A query string parameter is created in the Web URL schema template for the operation. It is a name value pair parameter where the name is defined in the definition. It has a tag as its default value where tag is an environment tag with a name specified in the security scheme, for example, as %%<syncSourceName>/ApiKeyAuth/X-API-KEY%%.
- Cookie: This location results in an HTTP header in the operation. The name is Cookie and the value is <parameter name from definition>=<environment tag>.
- OAuth
- Not supported.
- OpenIdConnect
- Not supported.
Procedure
-
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 .
- Click the Create Synchronization Source icon () and select OpenAPI 3.0 Definition from the Type list.
- Paste a URL or file location that points to an OpenAPI 3.0 definition into the workspace for the Logical View.
-
Complete the information on the first page of the Create a new Synchronization
Source wizard that is unique to the OpenAPI 3.0 source.
That information consists of the location for the definition file to use as a sync source. In the Location field enter a URL that points to an OpenAPI 3.0 definition file, or click Browse to find an OpenAPI 3.0 definition file on your local network. The OpenAPI 3.0 definition can be in either JSON or YAML format.
Browse to display a list of identities. To add an identity to an OpenAPI 3.0 document, see Adding an identity to the Physical view.
- Optional:
Enter any authorization values for one or more operations that are using the listed security
schemes.
Starting from HCL DevOps Test Integrations and APIs (Test Integrations and APIs) Version 10.0.0, the Authorizations page is displayed only if the OpenAPI 3.0 definition includes one or more operations that use one or more security schemes. You can enter authorization values now or enter the values later by editing the values of the named environment tags, the HTTP transport, or both.
- Complete the wizard by following the instructions in Adding a synchronization source.