Services from Swagger Do Not Resolve JSON $REF Statements

Document ID : KB000117143
Last Modified Date : 08/10/2018
Show Technical Document Details
Issue:
The Swagger contains JSON relative reference notations ($REF) to objects in the JSON structure.  When the Workstation is used to generate a virtual service, these references are not resolved which causes the resulting VSI Response to not contain the proper response data.

A sample of the reference looks like the below:  
"parameters": [ 

"name": "body", 
"in": "body", 
"required": true, 
"description": "Account summary information", 
"schema": { 
"$ref": "#/definitions/DetailsRequest" 


], 


"definitions": { 
"DetailsRequest": { 
"type": "object", 
"required": [ 
"Test.accountNumber", 
"pId", 
"pType" 
], 
"properties": { 
"Test.accountNumber": { 
"type": "string", 
"description": "Acct number is the unique" 
}, 
"pId": { 
"type": "string", 
"description": "product id" 
}, 
"pType": { 
"type": "string", 
"description": "product type" 


},
Created VS doesn't show the response related to "$ref": "#/definitions/DetailsRequest". It just shows as below:
---
{"status": { 
"code": "{{=[:StringProperty:A*(5-15)]}}", 
"message": "{{=[:StringProperty:A*(5-15)]}}" 
}} 
}
----
Environment:
DevTest 10.3
Cause:
Defect.
Resolution:
Please open a support case and refer DE381057 and we can share the patch for 10.3.