DRY out; remove unnecessary TODOs

This commit is contained in:
Jeff Williams 2014-04-14 17:34:00 -07:00
parent 48fa2fd320
commit bb42bed7c8

View File

@ -18,6 +18,9 @@ var OBJECT = 'object';
var STRING = 'string';
var UNDEFINED = 'undefined';
var BOOLEAN_OPTIONAL = [BOOLEAN, NULL, UNDEFINED];
var STRING_OPTIONAL = [STRING, NULL, UNDEFINED];
var EVENT_REGEXP = /event\:[\S]+/;
var PACKAGE_REGEXP = /package\:[\S]+/;
@ -120,13 +123,11 @@ var ENUM_PROPERTY_SCHEMA = exports.ENUM_PROPERTY_SCHEMA = {
type: STRING
},
defaultvalue: {
// TODO: stop adding property if it's empty
type: [STRING, NULL, UNDEFINED],
type: STRING_OPTIONAL,
optional: true
},
description: {
// TODO: stop adding property if it's empty
type: [STRING, NULL, UNDEFINED],
type: STRING_OPTIONAL,
optional: true
},
kind: {
@ -161,14 +162,12 @@ var PARAM_SCHEMA = exports.PARAM_SCHEMA = {
properties: {
// what is the default value for this parameter?
defaultvalue: {
// TODO: stop adding property if it's empty
type: [STRING, NULL, UNDEFINED],
type: STRING_OPTIONAL,
optional: true
},
// a description of the parameter
description: {
// TODO: stop adding property if it's empty
type: [STRING, NULL, UNDEFINED],
type: STRING_OPTIONAL,
optional: true
},
// what name does this parameter have within the function?
@ -177,22 +176,19 @@ var PARAM_SCHEMA = exports.PARAM_SCHEMA = {
},
// can the value for this parameter be null?
nullable: {
// TODO: stop adding property if it's empty
type: [BOOLEAN, NULL, UNDEFINED],
type: BOOLEAN_OPTIONAL,
optional: true
},
// is a value for this parameter optional?
optional: {
// TODO: stop adding property if it's empty
type: [BOOLEAN, NULL, UNDEFINED],
type: BOOLEAN_OPTIONAL,
optional: true
},
// what are the types of value expected for this parameter?
type: TYPE_PROPERTY_SCHEMA,
// can this parameter be repeated?
variable: {
// TODO: stop adding property if it's empty
type: [BOOLEAN, NULL, UNDEFINED],
type: BOOLEAN_OPTIONAL,
optional: true
}
}
@ -278,8 +274,7 @@ var DOCLET_SCHEMA = exports.DOCLET_SCHEMA = {
},
// a description
description: {
// TODO: stop adding property if it's empty
type: [STRING, NULL, UNDEFINED],
type: STRING_OPTIONAL,
optional: true
},
// something else to consider
@ -315,8 +310,7 @@ var DOCLET_SCHEMA = exports.DOCLET_SCHEMA = {
}
},
forceMemberof: {
// TODO: stop adding property if it's empty
type: [BOOLEAN, NULL, UNDEFINED],
type: BOOLEAN_OPTIONAL,
optional: true
},
ignore: {