CVEProject/cve-services

inconsistent JSDoc data for validateDescription

ElectricNroff opened this issue · 0 comments

* @param {String} descIndex
* @returns true
* @throws Error
*/
function validateDescription (descIndex) {
// For each index, check if it exists, then apply custom validator
return body(descIndex).optional({ nullable: true }).isArray().custom((descriptions, { req, path }) => {

this seems to be intended to be called with an array of strings and thus {String} could be replaced by {String[]}