fix(config): restore applyDefaults:true for AJV plugin/channel schema validation

This commit is contained in:
supermario_leo
2026-04-06 20:16:22 +08:00
committed by Peter Steinberger
parent 318c0f2e89
commit 92ffb9af86

View File

@@ -766,7 +766,8 @@ function validateConfigObjectWithPluginsBase(
schema: channelSchema,
cacheKey: `channel:${trimmed}`,
value: config.channels[trimmed],
applyDefaults: opts.applyDefaults,
applyDefaults: true, // Always apply defaults for AJV schema validation;
// writeConfigFile persists persistCandidate, not validated.config (#61841)
});
if (!result.ok) {
for (const error of result.errors) {
@@ -957,7 +958,8 @@ function validateConfigObjectWithPluginsBase(
schema: record.configSchema,
cacheKey: record.schemaCacheKey ?? record.manifestPath ?? pluginId,
value: entry?.config ?? {},
applyDefaults: opts.applyDefaults,
applyDefaults: true, // Always apply defaults for AJV schema validation;
// writeConfigFile persists persistCandidate, not validated.config (#61841)
});
if (!res.ok) {
for (const error of res.errors) {