Forum Discussion

danipjacob's avatar
danipjacob
New Member
3 years ago

$Ref get replaced by original parameter property after postProcessSupportingFileData methd execution

Hi Team,

I am currently trying to process swagger.json to make it customizable (for adding few additional properties) by overriding postProcessSupportingFileData  method. While doing this my original swagger.json has a parameter section which is like below:

 

"parameters": [
{
"$ref": "#/parameters/lastName"
},
{
"$ref": "#/parameters/firstName"
},

But after generation it changes to 

"parameters": [
{
"name": "lastName",
"in": "query",
"description": "Last name of one traveler part of the cart or the order",
"required": false,
"type": "string",
"pattern": "^[A-Za-z\\u00C0-\\u1FFF\\u3040-\\uD7AF][A-Za-z\\u00C0-\\u1FFF\\u3040-\\uD7AF\\u2019 \\-.]{0,69}$",
"x-risk-personal-data-field": "PASSENGER_NAME"
},
{
"name": "firstName",
"in": "query",
"description": "First name of one traveler part of the order",
"required": false,
"type": "string",
"pattern": "^[A-Za-z\\u00C0-\\u1FFF\\u3040-\\uD7AF][A-Za-z\\u00C0-\\u1FFF\\u3040-\\uD7AF\\u2019 \\-.]{0,69}$",
"x-risk-personal-data-field": "PASSENGER_NAME"
}. I need to get it in original form itself. How can I achieve it?

@links

No RepliesBe the first to reply