Updating APIs

Applies to ReadyAPI 3.57, last modified on December 20, 2024

When the service that you test expands, new requests are added to it, and old requests are modified with new options. The definition in ReadyAPI is not updated automatically and becomes outdated. The updating and refactoring definition dialogs allow you to keep your service up-to-date. Each dialog has its own range of use:

Update the definition when  

  • new requests were added.

  • new parameters were added to existing requests.

Refactor the definition when  

  • parameter names were changed.

  • requests were renamed.

  • a resource or operation name was changed.

This topic describes how to update the definition. To learn how to refactor the service, see Refactoring REST APIs and Refactoring SOAP APIs.

Updating the Definition

  1. Switch to Projects.

  2. Right-click the REST Service or SOAP Interface you want to update in the Navigator panel and select Update Definition.

    Tip: You can also select the item you need and press the F5 hotkey.
  3. In the Update Definition dialog, specify the path to the definition file you use and configure update parameters. See below for detailed information on REST and SOAP parameters.

  4. If the new SOAP definition is missing bindings specified in the old definition, you will need to remap them or use SOAP Refactoring to update the definition. REST definitions are updated automatically according to the options specified in the Update Definition dialog.

Update definition dialog for REST services

Click the image to enlarge it.

Importing API definition from SwaggerHub

Click the image to enlarge it.

Option Description
Definition URL The path to the definition to be used. Click Browse to find the file in the file explorer.
Delete custom resources If selected, removes all resources that are not specified in the new definition.
Delete custom methods If selected, removes all methods that are not specified in the new definition and belong to resources specified in the definition.
Delete custom parameters If selected, removes all parameters that are not specified in the new definition and belong to requests specified in the definition.
Add new methods to virtual services Adds new methods to ReadyAPI virtual APIs in the same project.
Delete custom methods form virtual services If selected, removes methods that are absent from the imported definition from virtual APIs.
Definition format Specifies the format of the imported definition. Available options: WADL and Swagger (works both for OpenAPI and Swagger specs).
Update definition dialog for SOAP interfaces

Click the image to enlarge it.

Option Description
Definition URL The path to the definition to be used. Click Browse to find the file in the file explorer.
Paths to local files must start with file:/ if you enter them manually.
Create New Requests Create default requests for new operations in the service.
Recreate Requests Recreate already existing requests according to the new schema. Affects SOAP Request test steps in functional tests.
Recreate Optional Also creates optional elements when recreating requests.
Keep Existing Recommended. If the element name and namespace are the same in old and new definitions, its value is preserved.
Keep SOAP Headers Keep the SOAP headers unchanged when recreating the request.
Create Backups Recommended. Creates backup requests and SOAP Request test steps when recreating requests.
Update Requests Select to update all requests in the interface.
Open Request List Opens the panel with the list of updated requests.

See Also

Refactoring REST APIs
Refactoring SOAP APIs

Highlight search results