code: function parseSchemaReferences(schemaJSON)
      {
      	//first we wrap our object with traverse methods
      	var tJSON = traverse(schemaJSON);
  
      	var references = {};
  
      	self.log('--  Parsing refs -- ');
        // self.log(schemaJSON);
      	//now we step through pulling the path whenever we hit a reference
      	tJSON.forEach(function(node)
      	{
      		//we are at a reference point
          //we make an exception for arrays -- since the items object can hold references!
          if(this.node["$ref"] && (this.key == "items" || !self.keywordRegExp.test(this.key)))
      		// if(this.isLeaf && this.key == "$ref")
      		{
      			//todo logic for when it's "oneOf" or other valid JSON schema things
      			var fullPath = this.path.join(pathDelim);//this.path.slice(0, this.path.length-1).join(pathDelim);
      			var referenceType = this.node["$ref"];
  
            
            var objectPath = self.stripObjectPath(this.path);
  
            //pull the "items" piece out of the path -- otherwise, if you're just a normal object -- it's the same as fullPath
            var typePath = this.key == "items" ? this.path.slice(0, this.path.length-1).join(pathDelim) : fullPath;
  
  
  
      			if(references[fullPath])
      			{
      				throw new Error("Not yet supported reference behavior, arrays of references: ", fullPath);
      			}
  
            //assuming type is defined here!
      			references[fullPath] = {schemaType: referenceType, schemaPath: fullPath, objectPath: objectPath, typePath: typePath};
            self.log(self.log.testing, 'Reference detected @ '+fullPath+': ', references[fullPath]);
      		}
      	});
  
      	self.log("-- Full refs -- ", references);
  
      	return references;
      }
docs: storing the references inside of a schema object (if we don't already know them)