This API lets you upload a Swagger specification to API Test Maker and automatically create auto generated tests for each operation in your API. This API call includes parameters to identify the location of your Swagger specification and a configuration file. The configuration file includes authentication credentials, such as an API key, Basic Auth, or OAuth credentials.
|name||Name of the model.|
|spec||The path to the Swagger specification.|
|configuration||The path to the configuration file that defines authentication credentials, such as API key, Basic Auth, and OAuth. This is an optional file parameter.|
Example Configuration Files
Note: In the following examples, activeAuthorizationMode is an optional field. If you need to provide more than one authorization mode, you can pass the value for the key that drives the authorization selection for the model. You cannot provide more than one authorization mode without using activeAuthorizationMode.
Example Configuration File with API Key
Example Configuration File with Basic Auth
Example Configuration File with OAuth
Valid Configuration Files
You can define all available authorization types, and then use activeAuthorizationMode to determine which authorization is applied for your model.
You can also set authorization to "null" if you do not need authorization for your model.
Invalid Configuration Files
activeAuthorizationMode is an optional field, but it becomes a required field if one or more authorization types are defined (not null).
The valid values for activeAuthorizationMode are:
If you define a valid activeAuthorizationMode, but the corresponding authorization is not provided, you will see the following error.
If you define a valid activeAuthorizationMode, but no authorization is not provided, you will see the following error.