Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else if (header.collectionFormat) {
if (options.patch) {
delete header.collectionFormat;
}
else {
throwError('(Patchable) collectionFormat is only applicable to header.type array', options);
}
}
delete header.type;
for (let prop of common.parameterTypeProperties) {
if (typeof header[prop] !== 'undefined') {
header.schema[prop] = header[prop];
delete header[prop];
}
}
for (let prop of common.arrayProperties) {
if (typeof header[prop] !== 'undefined') {
header.schema[prop] = header[prop];
delete header[prop];
}
}
}
}