docs: function deref (schema, options) {
    options = _.defaults(options, defaults)
  
    const bf = options.baseFolder
    let cwd = bf
    if (!utils.isAbsolute(bf)) {
      cwd = path.resolve(process.cwd(), bf)
    }
  
    const state = {
      graph: new DAG(),
      circular: false,
      circularRefs: [],
      cwd: cwd,
      missing: [],
      history: []
    }
  
    try {
      const str = JSON.stringify(schema)
      state.current = md5(str)
    } catch (e) {
      return e
    }
  
    const baseSchema = clone(schema)
  
    cache = {}
  
    let ret = derefSchema(baseSchema, options, state)
    if (ret instanceof Error === false && state.error) {
      return state.error
    }
    return ret
  }