diff --git a/lib/schemaUtils.js b/lib/schemaUtils.js index 2a6f7ad0a..c80668ba9 100644 --- a/lib/schemaUtils.js +++ b/lib/schemaUtils.js @@ -2129,6 +2129,10 @@ module.exports = { rDataMode = 'raw'; let bodyType, language; + if (contentObj.hasOwnProperty('schema') && contentObj.schema.hasOwnProperty('$ref')) { + contentObj.schema = this.getRefObject(contentObj.schema.$ref, components, options); + } + // checking for all possible raw types if (contentObj.hasOwnProperty(APP_JS)) { bodyType = APP_JS; } else if (contentObj.hasOwnProperty(APP_JSON)) { bodyType = APP_JSON; }