Software AG Products 10.7 | Service Development Help | Working with REST API Descriptors | Refreshing a REST API Descriptor
 
Refreshing a REST API Descriptor
If the Swagger or OpenAPI document used to create a REST API descriptor (RAD) changes, you may want to refresh the RAD to reflect the recent changes or to refresh the RAD using a different Swagger or an OpenAPI document. For example, if you created a RAD from a Swagger or an OpenAPI document that has changed to include, edit, or remove an operation, path, or definition, you can refresh the RAD. Refreshing the RAD does the following:
Swagger based provider RAD
Swagger based consumer RAD
OpenAPI based provider RAD
Common
Updates the RAD, its associated services, document types, or resources to reflect the changes.
Adds elements, such as services, document types, or resources to the RAD to reflect new elements in the updated Swagger document.
Preserves any changes that you have made to the service implementation in the RAD.
Re-generates the service implementation and overrides the previous data that you have added in the RAD.
Adds elements, such as services, document types, callback services, or resources to the RAD to reflect new elements in the updated OpenAPI document.
Removes RAD elements that correspond to elements that have been removed from the updated Swagger document.
Note:
In Designer, the option to refresh a RAD is available only for those RADs that are created using a Swagger or an OpenAPI document.
*To refresh a REST API Descriptor
1. In the Package Navigator view, lock the RAD that you want to refresh.
2. Right-click the RAD and select Refresh REST API Descriptor.
3. Review the informational message about potential changes to the existing RAD and click OK to continue with refresh.
4. If the location of the original Swagger or OpenAPI document has changed or you want to refresh with a new Swagger or OpenAPI document, click Yes. Click No to use the Swagger or OpenAPI document from the existing specified location.
a. If you select Yes,
*For Swagger based provider or consumer RAD: Designer displays the Select the Swagger Document Location dialog box. Select the Swagger document for which the location has changed. In case of consumer RAD, you can select or clear the REST operations from the selected Swagger document. Click Next to select or clear one or more REST operations or methods. Otherwise, click Finish.
*For OpenAPI based provider RAD: Designer displays the Select the OpenAPI Document Location dialog box. Select the OpenAPI document for which the location has changed. Click Finish.
b. For Swagger based consumer RAD: If you select No, Designer displays the Select the REST Operations dialog box. You can choose the REST operations that you want to include in the refreshed RAD. Select or clear one or more REST operations or methods and click Finish.
Designer refreshes the RAD. If Designer cannot refresh a RAD, Designer rolls back to the last saved version of the RAD. If refresh is not successful, use the messages returned by Designer and Integration Server logs to determine the issue.