ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Additional '/' getting added in the operation when VS is created from Swagger specification


Article ID: 106052


Updated On:


CA Application Test CA Continuous Application Insight (PathFinder)


When creating VS using Swagger document, the VSI is created with an extra '/' in the operation. For example, the transactions are shown as below:

POST //v2/Test12/


Basepath defined in the Swagger doc causes the issue.


DevTest environments 10.2 and 10.3.


. Removing the "basepath":"/" in the Swagger doc will resolve the issue. If the Swagger doc needed a base path as "/" or at the end like "/v2/" then please open a support case and refer DE374965.

Additional Information

Here is some information on basepath and host per Swagger specification: 

basepath: Per swagger 2 specification at "", "A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended to the basepath in order to construct the full URL." 

host: Per swagger 2 specification at "", "The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/).  

For example, 
. If Swagger doc has the "basepath": "/v2" after the "host":"", then /v2 is added to all the transactions like /v2/api/testcase/test12, /v2/api/testvi,.. 
. If Swagger doc has the "basepath": "/v2/" after the "host":"", then /v2/ is added to all the transactions like //v2/api/testcase/test12, //v2/api/testvi,.. (This is the issue you have)