(schema, options)
| 40 | } |
| 41 | |
| 42 | const convert = (schema, options) => { |
| 43 | const opts = options || {} |
| 44 | if(opts.path === undefined) { |
| 45 | opts.path = [] |
| 46 | } |
| 47 | if(opts.lookup === undefined) { |
| 48 | opts.lookup = {} |
| 49 | } |
| 50 | return app.get('schema_converter').reduce((prve, converter) => { |
| 51 | return converter(prve, schema, opts) |
| 52 | }, opts.global && opts.global.formDefaults ? _.cloneDeep(opts.global.formDefaults) : {}) |
| 53 | } |
| 54 | |
| 55 | const converters = [ |
| 56 | // all form field |