code: function generateModelDefinition(schema, definitionName) {
      var definition = {
        required: [],
        properties: {}
      };
      mergePaths(definition, schema.paths, definitionName);
      mergePaths(definition, schema.virtuals, definitionName);
  	
      //remove empty arrays -> swagger 2.0 validates 
      if (definition.required.length === 0) {
      	delete(definition.required);
      }
      if (definition.properties.length === 0) {
      	delete(definition.properties);
      }
      return definition;
    }
docs: A method used to generate a Swagger model definition for a controller