diff --git a/bin/create-json-schema.js b/bin/create-json-schema.js index fde39379be369d0934d0b8e16120142574a8507b..c6c8ecb938126f93e2b30e0107b7154b8599c2b0 100644 --- a/bin/create-json-schema.js +++ b/bin/create-json-schema.js @@ -40,7 +40,7 @@ function createSingleConfig(option) { if (option.default !== undefined) { temp.default = option.default; } - if (temp.type === 'object') { + if (temp.type === 'object' && !option.freeChoice) { temp.$ref = '#'; } return temp; diff --git a/lib/config/definitions.js b/lib/config/definitions.js index 0f82c382713edd93f9c8c7146e72959041225e70..69cd6144b82c0833d24451e7fd0c1d389a5cc494 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -1553,6 +1553,7 @@ const options = [ name: 'prBodyDefinitions', description: 'Table column definitions for use in PR tables', type: 'object', + freeChoice: true, mergeable: true, default: { Package: '{{{depName}}}', diff --git a/lib/config/validation.js b/lib/config/validation.js index 9bd7425e69e4e6f5488478ea6999b6ca08a23dec..c177fc1dd53624d45ca35da9b9bfdec2b15ffb3e 100644 --- a/lib/config/validation.js +++ b/lib/config/validation.js @@ -259,13 +259,18 @@ async function validateConfig(config, isPreset, parentPath) { } } else if (type === 'object') { if (is.object(val)) { - const subValidation = await module.exports.validateConfig( - val, - isPreset, - currentPath - ); - warnings = warnings.concat(subValidation.warnings); - errors = errors.concat(subValidation.errors); + const ignoredObjects = options + .filter(option => option.freeChoice) + .map(option => option.name); + if (!ignoredObjects.includes(key)) { + const subValidation = await module.exports.validateConfig( + val, + isPreset, + currentPath + ); + warnings = warnings.concat(subValidation.warnings); + errors = errors.concat(subValidation.errors); + } } else { errors.push({ depName: 'Configuration Error', diff --git a/renovate-schema.json b/renovate-schema.json index 03a11f99d2a86e23d4bd78e165cbe062d3812982..abe6b91b2e4debefe5ba00ea739e3cad37427a2b 100644 --- a/renovate-schema.json +++ b/renovate-schema.json @@ -1073,8 +1073,7 @@ "Change": "{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}", "References": "{{{references}}}", "Package file": "{{{packageFile}}}" - }, - "$ref": "#" + } }, "prBodyColumns": { "description": "List of columns to use in PR bodies",