code: function extend(derived) {
      var base = derived['extends'];
      if (defined(base)) {
          delete derived['extends'];
          // TODO: extends could be an array
          mergeProperties(derived, base);
  
          extend(derived);
      }
  
      for (var name in derived) {
          if (derived.hasOwnProperty(name)) {
              if (typeof derived[name] === 'object') {
                  extend(derived[name]);
              }
          }
      }
  }
docs: ////////////////////////////////////////////////////////////////////////////// 
  @function extend
  Recursively finds schemas being referenced within the 'extends' property and merges
  those properties into the referencing part of the schema.
  @param  {object} derived - The json schema object that may have an 'extends' property that needs resolving.
  @return {object} The resolved json schema object.