In DevTest Portal, creating a Virtual Service from a Swagger URL fails with: Failed to open URL

book

Article ID: 141360

calendar_today

Updated On:

Products

CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization

Issue/Introduction

In the DevTest Portal, when trying to create a Virtual Service from a URL specification, the following error is shown:
Specification component 'https://internalserver/tmp/swagger.json' had an error while being processed.
Failed to open URL:https://internalserver/tmp/swagger.json

This swagger document is hosted on a secured website within the internal network and the browser needs a certificate to access the website. 
How do we provide the certificate in the Devtest Portal, so it can access the URL to read swagger document?

When entering https://internalserver/tmp/swagger.json directly in the browser, the Json code is shown and looks like:
{"swagger":"2.0","info":{"description":"...

 

Environment

Release : 10.5.1

Component : CA Service Virtualization

Resolution

The browser should be configured with the certificate to be able to read the URL.
In Google Chrome for example, select settings, Advanced, Manage certificates.

Because the Swagger code is shown when entering the URL directly in the browser, it appears the certicate is correctly configured.
The error is caused by another local networking configuration restriction. Perhaps related to a browser configuration or proxy.

To test and confirm the following URL, that is publicly available, could be used: 
https://petstore.swagger.io/v2/swagger.json

As a workaround, the json code as shown in the browser can be saved in a file and then read by the Portal.