projects/formio-editor/src/lib/resource-json-schema/json-schema-generator.js
// Subclasses overriding this method MUST call super.build()
Subclasses overriding this method MUST call super.build()
Subclasses overriding this method MUST call super . build ()
build() {
        const jsonSchema = Object.assign({}, this.dataType);
        if (this.definitions) {
            const defKeys = Object.keys(this.definitions);
            if (defKeys.length > 0) {
                jsonSchema.definitions = defKeys.reduce((defs, dk) => {
                    defs[dk] = this.definitions[dk].build();
                    return defs;
                }, {});
            }
        }
        return jsonSchema;
    }
build ( ) { const jsonSchema = Object . assign ( { } , this . dataType ) ; if ( this . definitions ) { const defKeys = Object . keys ( this . definitions ) ; if ( defKeys . length > 0 ) { jsonSchema . definitions = defKeys . reduce ( ( defs , dk ) => { defs [ dk ] = this . definitions [ dk ] . build ( ) ; return defs ; } , { } ) ; } } return jsonSchema ; }
Subclasses overriding this method MUST call super.build()
Subclasses overriding this method MUST call super . build ()
// Start creating json schema from builder's dataType  // Compile builder's definitions (if any)