code: function collectProperties (schemaObj, props) {
      if (schemaObj.properties) {
        for (var property in schemaObj.properties) {
          if (schemaObj.properties.hasOwnProperty(property)) {
            props[property] = schemaObj.properties[property];
          }
        }
      }
      if (schemaObj.allOf) {
        schemaObj.allOf.forEach(function (parent) {
          collectProperties(parent, props);
        });
      }
    }
docs: Recursively collects all properties of the schema and its ancestors. They are added to the props object.