diff --git a/lib/config/validation.spec.ts b/lib/config/validation.spec.ts index 914d761b8257725b3fb7fb1c6429a0e2c058e9a8..a49e75c0de319e83b6525e6a207b5e9ff967006a 100644 --- a/lib/config/validation.spec.ts +++ b/lib/config/validation.spec.ts @@ -329,10 +329,6 @@ describe('config/validation', () => { } as any; const { errors } = await configValidation.validateConfig('repo', config); expect(errors).toMatchObject([ - { - message: - 'Invalid JSONata expression for customDatasources: Expected "]" before end of expression', - }, { message: 'Invalid `customDatasources.defaultRegistryUrlTemplate` configuration: is a string', diff --git a/lib/config/validation.ts b/lib/config/validation.ts index 18ce6a31ca4a4907d68a2a515a9ea3db316e4332..d139cb42c104365eee9162102d3e97ed084867b3 100644 --- a/lib/config/validation.ts +++ b/lib/config/validation.ts @@ -747,17 +747,7 @@ export async function validateConfig( message: `Invalid \`${currentPath}.${subKey}\` configuration: key is not allowed`, }); } else if (subKey === 'transformTemplates') { - if (is.array(subValue, is.string)) { - for (const expression of subValue) { - const res = getExpression(expression); - if (res instanceof Error) { - errors.push({ - topic: 'Configuration Error', - message: `Invalid JSONata expression for ${currentPath}: ${res.message}`, - }); - } - } - } else { + if (!is.array(subValue, is.string)) { errors.push({ topic: 'Configuration Error', message: `Invalid \`${currentPath}.${subKey}\` configuration: is not an array of string`,