expandSchema (schema) {
    Object.entries(this._subSchema1).forEach(([key, func]) => {
      if (schema[key]) {
        func.call(this, schema)
      }
    })

    let extended = extend({}, schema)

    Object.entries(this._subSchema2).forEach(([key, func]) => {
      if (schema[key]) {
        extended = func.call(this, schema, extended)
      }
    })

    return this.expandRefs(extended)
  }
Expands a JSON schema and its references.

@param {object} schema - A JSON Schema with references already loaded.
@returns {object} A JSON Schema with references expanded.