Deref object in form data params

Dereference form data params
This commit is contained in:
Luis Tejeda
2022-06-24 12:39:27 -05:00
parent 6df66da0d6
commit a559161597
3 changed files with 54 additions and 1 deletions

View File

@@ -1820,6 +1820,10 @@ module.exports = {
bodyData = this.convertToPmBodyData(contentObj[FORM_DATA], requestType, FORM_DATA,
PARAMETER_SOURCE.REQUEST, options.indentCharacter, components, options, schemaCache);
encoding = contentObj[FORM_DATA].encoding ? contentObj[FORM_DATA].encoding : {};
if (contentObj[FORM_DATA].hasOwnProperty('schema') && contentObj[FORM_DATA].schema.hasOwnProperty('$ref')) {
contentObj[FORM_DATA].schema = this.getRefObject(contentObj[FORM_DATA].schema.$ref, components, options);
}
// create the form parameters and add it to the request body object
_.forOwn(bodyData, (value, key) => {