lib/common.js
function addTag(tag, options) {
    addToCommon({
        schemaKey: schemaIds.tag,
        object: tag,
        targetObject: state.common.tags,
        displayName: 'Tag'
    }, options);
}
function addTag(tag, options) {
    addToCommon({
        schemaKey: schemaIds.tag,
        object: tag,
        targetObject: state.common.tags,
        displayName: 'Tag'
    }, options);
}
function addTag ( tag , options ) { addToCommon ( { schemaKey : schemaIds . tag , object : tag , targetObject : state . common . tags , displayName : 'Tag' } , options ) ; }
Adds a common tag for later use.
@paramSchema tag ./lib/schemas/tag.json
@param {object} tag Allows adding meta data to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag used there.
@param {string} tag.name - Required. The name of the tag.
@param {string} [tag.description] - A short description for the tag. GFM syntax can be used for rich text representation.
@param {object} [tag.externalDocs] - information about external documentation
@param {string} [tag.externalDocs.description] - A short description of the target documentation. GFM syntax can be used for rich text representation.
@param {string} tag.externalDocs.url - Required. The URL for the target documentation. Value MUST be in the format of a URL.
@param {AddCommonItemOptions} [options] - Options to apply when adding the provided item.
@returns {void}
@example
var swagger = require('swagger-spec-express');
swagger.common.addTag({
name: "Info",
description: "Info about the api"
});
//...
router.get('/', function (req, res) {
//...
}).describe({
//...
tags: ["Info"],
//...
});
Adds a common tag for later use .