Use API Discovery Service
You can specify a URL pointing to a Swagger 2.0 or OpenAPI 3.0 definition. This feature enables synchronization with the specified definition.
Procedure
In this example, we will use the https://petstore.swagger.io/v2/swagger.json which is a sample pet store server.
-
Create a new API.
-
Set the type as External.
Ensure that you set the API format in accordance with the format supported by your API server. -
Add a Name.
-
Add the endpoint. In this case, it is https://petstore.swagger.io.
-
Select Save and Display.
Once that is done, select Edit. The API Discovery Service will appear.
-
In API URI place https://petstore.swagger.io/v2/swagger.json.
-
Select Synchronize.
A dialog will appear, presenting all the new operations along with their respective details. By selecting a specific operation, you will be able to view and compare all the details, effectively highlighting the changes between the old and new definitions.
Select Synchronize to incorporate the new definition.