utility/metadata-schema-to-js-doc/inject-schema.js
function generateCommentFromOptions(options, callback) {
    console.info('\t\tGenerating comments for', options.paramName, '...');
    async.waterfall([
        async.apply(loadSchema, options),
        derefSchema,
        generateComment,
        addGeneratedComment
    ], function (err) {
        if (err) {
            return callback(err);
        }
        console.info('\t\t\tDone.');
        return callback(null, options);
    });
}
function generateCommentFromOptions(options, callback) {
    console.info('\t\tGenerating comments for', options.paramName, '...');
    async.waterfall([
        async.apply(loadSchema, options),
        derefSchema,
        generateComment,
        addGeneratedComment
    ], function (err) {
        if (err) {
            return callback(err);
        }
        console.info('\t\t\tDone.');
        return callback(null, options);
    });
}
function generateCommentFromOptions ( options , callback ) { console . info ( '\t\tGenerating comments for' , options . paramName , '...' ) ; async . waterfall ( [ async . apply ( loadSchema , options ) , derefSchema , generateComment , addGeneratedComment ] , function ( err ) { if ( err ) { return callback ( err ) ; } console . info ( '\t\t\tDone.' ) ; return callback ( null , options ) ; } ) ; }
Generates a comment based on input options
@param {object} options - Options to use to generate the comment.
@param {object} options.comment - The AST comment object.
@param {string} options.comment.type - The type of comment, string block etc.
@param {string} options.comment.value - The string comment value.
@param {string[]} options.line - The comment, split out into lines.
@param {string} options.paramName - The name of the parameter.
@param {string} options.schemaPath - The path to the schema file.
@param {number} options.insertAfterIndex - The index (line number) within the comment object where the comment should be inserted
@param {function} callback - A callback object with err param if something went wrong.
@returns {void}
Generates a comment based on input options