Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function extendSchema(rootSchema) {
rootSchema = JSON.parse(JSON.stringify(rootSchema));
eachSchema(rootSchema, childSchema => {
childSchema[UI_PROPERTY] = childSchema[UI_PROPERTY] || {};
childSchema[UI_PROPERTY] = Object.assign({
hidden: false,
title: childSchema.title || "",
description: childSchema.description || ""
}, childSchema.options, childSchema[UI_PROPERTY]); // @legacy options
});
return rootSchema;
}