How to use the json-schema-library.eachSchema function in json-schema-library

To help you get started, we’ve selected a few json-schema-library examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sueddeutsche / editron / utils / UISchema.js View on Github external
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;
}

json-schema-library

Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation

MIT
Latest version published 21 days ago

Package Health Score

65 / 100
Full package analysis