mirror of
https://github.com/jambonz/verb-specifications.git
synced 2025-12-18 20:37:46 +00:00
remove properties with undefined values before validation: the SttTask superclass of gather and transcribe creates them for label and callbackVendor
This commit is contained in:
@@ -58,7 +58,8 @@ function validateVerb(name, data, logger) {
|
||||
const dSpec = specData.properties[dKey];
|
||||
debug(`Task:validate validating property ${dKey} with value ${JSON.stringify(dVal)}`);
|
||||
|
||||
if (typeof dSpec === 'string' && dSpec === 'array') {
|
||||
if (typeof dVal === 'undefined') continue;
|
||||
else if (typeof dSpec === 'string' && dSpec === 'array') {
|
||||
if (!Array.isArray(dVal)) throw new Error(`${name}: property ${dKey} is not an array`);
|
||||
}
|
||||
else if (typeof dSpec === 'string' && dSpec.includes('|')) {
|
||||
|
||||
Reference in New Issue
Block a user