code: function resolveRef(subobj, parent, parentKey) {
                      if (!subobj.resolved) {
                          Object.keys(subobj).forEach(function (key) {
                              var Ref, value = subobj[key];
                              if (key === "$ref") {
                                  logger.debug("Resolving $ref: " + value);
                                  Ref = refResolver(value);
                                  value = typeof Ref === 'function' ? new Ref() : Ref;
                                  if (!util.isUndefined(value) && !value.resolved) {
                                      subobj.resolved = true;
                                      resolveRef(value, subobj, key);
                                  }
                                  parent[parentKey] = value;
                              } else if (typeof value === "object") {
                                  resolveRef(value, subobj, key);
                              }
                          });
                      }
                  }
docs: finds all $ref instances and replaces with the actual object similar to dojox.json.ref.resolveJson, but doesn't get hung up on circular references TODO: should we assume all schemas have been resolved prior, and remove this step?